subject

Consider the following class definitions: class bClass
{
public:
void setX(int);
void print() const;
private:
int x;
};
class dClass: public bClass
{
public:
void setXY(int, int);
void print() const;
private:
int y;
};

Which of the following statements correctly redefines the member functionprint of bClass?

a. void dClass::print() const {

dClass:print();

cout << " " << y << endl;
}

b. void dClass::print() const {

cout << x << " " << y << endl;
}

c. void bClass::print() const {

cout << x << " " << y << endl;
}

d. void dClass::print() const {

bClass::print();

cout << "y = " << y << endl;

}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
Search the web for two examples of digital art that you like. the examples must be from different mediums (example: one digital photo and one computer animation not two computer animations). compose an essay for each example you choose about why the piece appeals to you, and identify the medium used.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What is the biggest difference between section breaks and regular page breaks
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
You know the right answer?
Consider the following class definitions: class bClass
{
public:
void setX(int);...
Questions
question
Mathematics, 21.10.2019 21:30
question
Mathematics, 21.10.2019 21:30
Questions on the website: 13722367