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, 22.06.2019 10:00
Which of the following is true of operations within a spreadsheet program’s built-in functions? a. operations within parentheses, then multiplication and division, and then addition and subtraction are computed. b. operations within parentheses, then addition and subtraction, and then multiplication and division are computed. c. multiplication and division, then addition and subtraction, and then operations within parentheses are computed. d. addition and subtraction, then multiplication and division, and then operations within parentheses are computed
Answers: 2
question
Computers and Technology, 22.06.2019 10:30
Choose the best explanation for the following statement communication is symbolic
Answers: 3
question
Computers and Technology, 22.06.2019 18:00
Suppose an astronomer discovers a large, spherical-shaped body orbiting the sun. the body is composed mostly of rock, and there are no other bodies sharing its orbit. what is the best way to categorize this body? a. planet b. moon c. comet d. asteroid
Answers: 1
question
Computers and Technology, 23.06.2019 00:50
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
You know the right answer?
What is the output of the program?
#include
using namespace std;
class bclass
Questions
question
Spanish, 05.02.2021 18:20
question
Mathematics, 05.02.2021 18:20
question
English, 05.02.2021 18:20
question
Biology, 05.02.2021 18:20
Questions on the website: 13722361