Suppose a program has the following class declaration: 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.A) Suppose another class, Quiz, is derived from the CheckPoint class. Here is the first line of its declaration:class Quiz : private CheckPointIndicate whether each member of the CheckPoint class is private, protected, public, or inaccessible:abcsetAsetBsetCB) Suppose the Quiz class, derived from the CheckPoint class, is declared as class Quiz : protected CheckpointIndicate whether each member of the CheckPoint class is private, protected, public, or inaccessible:abcsetAsetBsetCC) 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:abcsetAsetBsetCD) Suppose the Quiz class, derived from the CheckPoint class, is declared asclass Quiz : CheckpointIs the CheckPoint class a private, public, or protected base class?
Suppose a program has the following class declaration:
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.
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?
Trending now
This is a popular solution!
Step by step
Solved in 2 steps