Question: HW5-1 Basic Version (100 points) Design an abstract baseclass named BasicShape that has a private member variable: double area a public exception class: Negativevalue and


HW5-1 Basic Version (100 points) Design an abstract baseclass named BasicShape that has a private member variable: double area a public exception class: Negativevalue and the following public member functions: get Area accessor to area set Area mutator for area calcArea0 pure virtual member function Design a class named Circle derived from BasicShape that has the following private member variables: double centerx; double centerY double radius; and the following public member functions: Constructor Circle (x, y, rad) that takes the arguments for the member variables Overridden calcArea 0, 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, 1) that takes the arguments for the member variables Overridden calcArea 0, which returns the area calculated as width length Demonstrate the class in a program. 1. Additional Requirements-Make sure youfollow these requirements to avoid losing points a) What to turn in Your code should be structured into the following files: BasicShape.h which contains the class definition and the inline function definitions of all the member functions for BasicShape
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
