Question: Problem: Write a Circle class in Circle.h that has the following member variables radius - a double pi- a double initialized with the value 3.14159

 Problem: Write a Circle class in Circle.h that has the following

Problem: Write a Circle class in Circle.h that has the following member variables radius - a double pi- a double initialized with the value 3.14159 The class should have the following member functions implemented in Circle.cpp Default constructor- a default constructor that set radius to o.o * Constructor accepts the radius of the circle as an argument setadius - a mutator function of the circle as an argument getRadius- an accessor function for the radius variable getArea - returns the area of the circle, which is calculated as area-pi radius radius Write a program that demonstrates the Circle class by asking the user for the circle radius and creating a Circle object. Print the radius. Then change the radius to a different value and print it again. Print the area of the circle Don't forget to add the appropriate headers and comments

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!