Consider the following class interfaces:
class Teacher
{
public:
Teacher();
...
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
Answers: 3
Computers and Technology, 24.06.2019 21:40
is on drugs i swear i ask a question and its not showing whats going
Answers: 2
Computers and Technology, 25.06.2019 05:30
In our new car, we were able to drive 30 miles in a half an hour. from this information, we can determine the car's a. acceleration. b. velocity. c. speed. d. direction.
Answers: 1
Computers and Technology, 25.06.2019 09:00
Janet has to prepare a presentation on business strategies for work. which guideline should she follow to create an effective presentation? a. use a readable font b. use a multicolored background c. use a small, but stylish font d. include detailed text
Answers: 1
History, 25.09.2019 02:00
Social Studies, 25.09.2019 02:00
English, 25.09.2019 02:00
Biology, 25.09.2019 02:00
Computers and Technology, 25.09.2019 02:00
Mathematics, 25.09.2019 02:00
Health, 25.09.2019 02:00
Biology, 25.09.2019 02:00
Mathematics, 25.09.2019 02:00
Law, 25.09.2019 02:00
Mathematics, 25.09.2019 02:00
Business, 25.09.2019 02:00
Chemistry, 25.09.2019 02:00