Answer to Question #58468 in C++ for jonney

Question #58468
class point {
private:
string mytype;
int x;
public:
point()
{
int getx()const{cout<<"point ::getx()const";return 10;}//statement A
int getx() {cout<<"point ::getx()"; return x;}//statement B
virtual string isa()const{return "point";} //statement c
};
class circle:protected point
{
public:
circle():point ()
virtual string isa() const{return "circle";} //statement D
void setr(int y=200){r=y;};
protected:
int getr()const {cout<<"\n circle::getr()"; return r;}
private:
int r;
};
answer the following
a)what is the relationships between "statement C"and "statement D"?
b)what is the relationships between "statement A"and "statement B"?
c)what is the relationships between point and circle classes?
d)what is the relationships between point and mytype classes?
1
Expert's answer
2016-03-18T15:48:05-0400
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-58468.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS