Question: A. (C++) Write a class declaration named Circle , with a private member variable, radius . Write set and get functions to access the radius
A. (C++) Write a class declaration named Circle, with a private member variable, radius. Write set and get functions to access the radius variable, and a function named get getArea which returns the area of the circle. The area is calculated as 3.14 * radius * radius.
B. Write a constructor to the circle that accepts an argument and assign its value to the radius member variable.
C. Add a static member variable that accounts for the currently active circle objects. Show your changes in the constructor and also, write a destructor function to do just that.
Please use basic C++ code without printf and scanf. Thank you in advance!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
