subject
Computers and Technology, 24.12.2019 19:31 gg808

What is the output of the program?
#include
using namespace std;
class bclass
{
public:
a. void print() const;
bclass(int a = 0, int b = 0);
//postcondition: x = a; y = b;
private:
int x;
int y;
};
class dclass: public bclass
{
public:
b. void print() const;
dclass(int a = 0, int b = 0, int c = 0);
//postcondition: x = a; y = b; z = c;
private:
int z;
};
int main()
{
bclass bobject(2, 3);
dclass dobject(3, 5, 8);
bobject. print();
cout < < endl;
dobject. print();
cout < < endl;
return 0 ;
}
c. void bclass: : print() const
{
cout < < x < < " " < < y < < endl;
}
bclass: : bclass(int a, int b)
{
x = a;
y = b;
}
d. void dclass: : print() const
{
bclass: : print(); //added second colon
cout < < " " < < z < < endl;
}
dclass: : dclass(int a, int b, int c)
: bclass(a, b)
{
z = c;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
What is the most important aspect of marking media? a. data labelingb. content descriptionc. electronic labelingd. classification
Answers: 2
question
Computers and Technology, 22.06.2019 06:00
Write a function that draws a pool ball. this function should take as parameters, the color, the number that should go on the pool ball, and the location of the center of the pool ball. the radius of the pool balls should be pool_ball_radius, and the font of the number should be pool_ball_font. the text of the pool ball font should be white. drawpoolball(color.orange, 5, 100, 100); drawpoolball(color.green, 6, 50, 200); drawpoolball(color.red, 3, 150, 350); drawpoolball(color.blue, 2, 250, 140); to center the numbers on the pool ball, you should use the getwidth() and getheight() methods. you are allowed to call these methods on your text object, such as txt.
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
What is a dashed line showing where a worksheet will be divided between pages when it prints? a freeze pane a split box a page break a print title
Answers: 1
You know the right answer?
What is the output of the program?
#include
using namespace std;
class bclass
Questions
question
Mathematics, 28.11.2021 14:00
question
World Languages, 28.11.2021 14:00
question
Mathematics, 28.11.2021 14:00
question
Social Studies, 28.11.2021 14:00
question
Computers and Technology, 28.11.2021 14:00
question
English, 28.11.2021 14:00
question
Mathematics, 28.11.2021 14:00
question
Geography, 28.11.2021 14:00
Questions on the website: 13722363