Question: class odd { protected: int id; public: string name; } ; class Deranged : public odd { public: void setName ( string name ) ;

class odd {
protected:
int id;
public:
string name;
};
class Deranged : public odd {
public:
void setName(string name);
void setID(int id);
};
void Deranged: : setName(string name){
this name = name; ??? statement A
}
void Deranged: : setID(int id){
this->id = id+1; // statement B
}
a. Both A and B are not accepted.
b. Statement A is accepted only.
c. Both A and B are accepted.
d. Statement B is accepted only.
 class odd { protected: int id; public: string name; }; class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!