Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please write c++ program that meets all the requirements based on below instructions. Please enter the same inputs as are in the screenshot to see
please write c++ program that meets all the requirements based on below instructions. Please enter the same inputs as are in the screenshot to see if you got the same outputs. Thanks
This homework assignment gives you the opportunity to practice inheritance, pure virtual member functions, abstract base classes. HW11 (100 points) Design an abstract base class named BasicShape that has a private member variable: double area NegativeValue getArea () accessor to area a public exception class: and the following public member functions: . setArea (area) mutator for area calcArea ) pure virtual member function that returns a double 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 (centerx_, centerY_, radius_) that takes the arguments and sets the member variables. The area should be set by calling calcArea then setArea. The constructor must throw the NegativeValue exception if any of the argument values is negative Overridden calcArea (), which returns the area calculated as 3.14159* adis*radius
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started