subject

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
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
You know the right answer?
Consider the following class interfaces: class Teacher
{
public:
Teacher();
...
Questions
question
Social Studies, 17.03.2020 17:32
question
Mathematics, 17.03.2020 17:32