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
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