Question: c++ program : Design an abstract base class named Basic Shape that has a private member variable: double area a public exception class: Negative value
c++ program :




Design an abstract base class named Basic Shape that has a private member variable: double area a public exception class: Negative value and the following public member functions: getArea accessor to area set Area mutator for area calcArea pure virtual member function Design a class named Circle derived from Basic Shape that has the following private member variables: double cent double cent double radius; and the following public member functions: Constructor Circle (x, y, rad) that takes the arguments for the member variables Overridden calcArea which returns the area calculated as 3.14159 radius radius Design a class named Rectangle derived from BasicShape that has the following private member variables: double width. double length and the following public member functions: Constructor Rectangle (w l) that takes the arguments for the member variables Overridden calcArea which returns the area calculated as width length Demonstrate the class in a program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
