How many public members does an object of class D have?

Consider the class inheritance.
```
class B
{
public:
B();
B(int nn);
void f();
void g();
private:
int n;
};
class D: public B
{
public:
D(int nn, double dd);
void h();
private:
double d;
};
```

a) 0
b) 1
c) 2
d) 3
e) 4
f) 5


e) 4

With public inheritance, public members of the base class become public members of the derived class.

Computer Science & Information Technology

You might also like to view...

A programmer must do the following before using an array:

a. declare then reference the array. b. create then declare the array. c. create then reference the array. d. declare then create the array.

Computer Science & Information Technology

"Step index" refers to which of the following?

A) The abrupt change in the refractive index for the core B) The abrupt change in the graded index from core to cladding C) The abrupt change in the graded index for the core D) The abrupt change in the refractive index from core to cladding

Computer Science & Information Technology

Elements and events are organized along a timeline in a(n) ____________________ authoring system.

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

Computer Science & Information Technology

Linux uses a logical directory tree to organize files into different folders.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology