Question: c++ 8. (TCO 4) Consider the following class definitions. class bClass { public: void setX(int a); //Postcondition: x = a; void print() const; private: int

c++

8. (TCO 4) Consider the following class definitions. class bClass { public: void setX(int a); //Postcondition: x = a; void print() const; private: int x; }; class dClass: public bClass { public: void setXY(int a, int b); //Postcondition: x = a; y = b; void print() const; private: int y; }; Which of the following correctly sets the values of x and y? (Points : 5)
void dClass::setXY(int a, int b) { bClass::setX(a); y = b; } void dClass::setXY(int a, int b) { x = a; y = b; } void dClass::setXY(int a, int b) { x = bClass::setX(a); y = bClass::setY(b); } void dClass::setXY(int a, int b) { x = bClass.setX(a); b = y; }

Question 9.9. (TCO 1) Examine the class definition. How many members does it contain? class Date { public: void setDate(int, int, int); void printDate() const; void setDay(int); void setMonth(int); void setYear(int); int getDay(); int getDay(); int getDay(); private: int day; int month; int year; }; (Points : 5)
6 3 9 11 None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!