Problem

Suppose a program has the following class declaration:// Declaration of CheckPoint class.c...

Suppose a program has the following class declaration:

// Declaration of CheckPoint class.class CheckPoint{ private: int a; protected: int b; int c; void setA(int x) { a = x;} public: void setB(int y) { b = y;} void setC(int z) { c = z;}};

Answer the following questions regarding the class:

A) Suppose another class, Quiz, is derived from the CheckPoint class. Here is the first line of its declaration:

class Quiz: private CheckPoint

Indicate whether each member of the CheckPoint class is private, protected, public, or inaccessible:

a

b

c

setA

setB

setC

B) Suppose the Quiz class, derived from the CheckPoint class, is declared as

class Quiz: protected Checkpoint

Indicate whether each member of the CheckPoint class is private, protected, public, or inaccessible:

a

b

c

setA

setB

setC

C) Suppose the Quiz class, derived from the CheckPoint class, is declared as

class Quiz: public Checkpoint

Indicate whether each member of the CheckPoint class is private, protected, public, or inaccessible:

a

b

c

setA

setB

setC

D) Suppose the Quiz class, derived from the CheckPoint class, is declared as

class Quiz: Checkpoint

Is the CheckPoint class a private, public, or protected base class?

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT