Consider the following class interfaces:
class Teacher
{
public:
Teacher();
...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 16.07.2021 21:50 christinemine556
Consider the following class interfaces:
class Teacher
{
public:
Teacher();
Teacher(string new_name);
string get_name() const;
private:
string name;
};
class MathsTeacher : public Teacher
{
public:
MathsTeacher();
MathsTeacher(string new_qualification, string new_name);
void display_data() const;
private:
string qualification;
};
int main()
{
Teacher t1, t2("John");
MathsTeacher mt1, mt2("TopLevel", "Sarah");
t1 = mt1;
t1 = t2;
mt1 = mc2;
mt1 = t1;
return 0;
}
Which one of the preceding assignment statements in the function main() would slice away the data of the derived class object?
A. c1 = ac1
B. c1 = c2
C. ac1 = ac2
D. ac1 = c1
![ansver](/tpl/images/cats/User.png)
Answers: 3
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 01:20
What is the full meaning of rfid in computer
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
You know the right answer?
Questions
![question](/tpl/images/cats/mat.png)
Mathematics, 22.03.2021 01:00
![question](/tpl/images/cats/fr.png)
French, 22.03.2021 01:00
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 22.03.2021 01:00
![question](/tpl/images/cats/mat.png)
Mathematics, 22.03.2021 01:00
![question](/tpl/images/cats/mat.png)
Mathematics, 22.03.2021 01:00
![question](/tpl/images/cats/istoriya.png)
History, 22.03.2021 01:00
![question](/tpl/images/cats/mat.png)
Mathematics, 22.03.2021 01:00
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mir.png)
World Languages, 22.03.2021 01:00
![question](/tpl/images/cats/istoriya.png)
History, 22.03.2021 01:00
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 22.03.2021 01:00
![question](/tpl/images/cats/istoriya.png)
History, 22.03.2021 01:00
![question](/tpl/images/cats/en.png)
English, 22.03.2021 01:00
![question](/tpl/images/cats/himiya.png)
Chemistry, 22.03.2021 01:00