Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a class declaration for a class named Circle, which has the data member radius , a double , and member functions setRadius ( )
Write a class declaration for a class named Circle, which has the data member radius a double and member functions setRadius which sets radius, calcArea which returns the area of the circle, calcDiameter which returns the diameter of the circle, calcCircumference which returns the circumference of the circle, and getRadius which returns the value of radius. The class should have a default constructor that has no parameters and sets radius to and a second constructor which accepts a parameter of double named rad for the radius of the circle. Write the code for these as inline functions. Write a main function that declares a Circle object and tests out ALL of the Circle class's functionality.
You are responsible for demonstrating all the functionality of your program based on the rubric for you to get credit. YOUR PROGRAM SHOULD DEMONSTRATE ALL OF THE FUNCTIONALITY WITHOUT ANY INPUT FROM THE USER! In industry you will be demonstrating that your program works like this. It is called a driver program. I should not have to interact with your program. Programs that are submitted without the use of a driver program will receive a grade of a until they are corrected so that they operate with a driver program.
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