Consider the following class definitions:class bClass{public:void set(double a, double b);//Postcondition: x = a; y = b;void print() const;bClass();//Postcondition: x = 0; y = 0;bClass(double a, double b);//Postcondition: x = a; y = b;private:double x;double y;};class dClass: public bClass{public:void set(double a, double b, double c);//Postcondition: x = a; y = b; z = c;void print() const;dClass();//Postcondition: x = 0; y = 0; z = 0 ;dClass(double a, double b, double c);//Postcondition: x = a; y = b; z = c;private:double z;};Which of the following dClass constructor definitions is valid in C++?

A. dClass::dClass(double a, double b, double c)
: bClass()
{
x = a;
y = b;
z = c;
}

B. dClass::dClass(double a, double c)
{
x = a;
z = c;
}

C. dClass::dClass(double a, double b)
: bClass()
{
x = a;
y = b;

}

D. dClass::dClass(double a, double b, double c)
: bClass(a, b)
{
z = c;
}


Answer: D

Computer Science & Information Technology

You might also like to view...

The more precise a project's objectives and deliverables, the clearer the ____ becomes.

A. estimate B. duration C. risk D. scope

Computer Science & Information Technology

The ____________________ operator advances the iterator to the next node in the linked list.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Structures can be stacked or connected to one another at their ____.

A. entry points only B. exit points only C. entry or exit points D. entry or combination points

Computer Science & Information Technology

Which of the following would a technician enable on a router to allow specific devices to connect to the Internet?

A. DHCP B. MAC filtering C. DNS D. SSID

Computer Science & Information Technology