Question: C++ GeometricObject Class A Fields color PI valid Colors Methods calculate Area calculatePerimeter GeometricObject getColor e proper Cap setColor toString Circle Class GeometricObject public A
C++





GeometricObject Class A Fields color PI valid Colors Methods calculate Area calculatePerimeter GeometricObject getColor e proper Cap setColor toString Circle Class GeometricObject public A Ring Class + Circle Fields radius Methods calculate Area calculate Perimeter Circle getRadius setRadius toString public Fields Inner Radius Methods @calculate Area calculatePerimeter egetInner Radius Ring setinnerRadius toString The diagram illustrates the Hierarchy-GeometricObject-Circle-Ring. The implementation of GeometricObject and Circle is provided below. You are asked to supply the Ring class by reverse-engineering the hierarchy shown above. r1 The Ring class represents a solid circular band with an outer and inner radius (say rl and r2 respectively). See figure on the right. Only the segment enclosed between rl and r2 is considered part of the ring. r2 Design Specifications 1. The Ring class is a public descendant of the Circle class. 2. It enhances the Circle definition by including a second radius used to set the inner face of the circular figure Main #include "Geometricobject.h" #include "Circle.h" #include "Ring.h" int main() { cout #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
