Problem

Suppose a program has the following class declarations:class Shape{private: double area;...

Suppose a program has the following class declarations:

class Shape{private: double area;public: void setArea(double a) { area = a; } double getArea() { return area; }};class Circle: public Shape{private: double radius;public: void setRadius(double r) { radius = r; setArea(3.14 * r * r); } double getRadius() { return radius; }};

Answer the following questions concerning these classes:

A) When an object of the Circle class is created, what are its private members?

B) When an object of the Circle class is created, what are its public members?

C) What members of the Shape class are not accessible to member functions of the Circle 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