Course Solutions Uncategorized (Solved) : C Write Circle Class Following Member Variables Radius Double Pi Double Initialized Value Q37130929 . . . .

(Solved) : C Write Circle Class Following Member Variables Radius Double Pi Double Initialized Value Q37130929 . . . .

 

C++

Write a Circle class that has the following membervariables:
• radius: a double
• pi: a double initialized with the value 3.14159

The class should have the following member functions:

• Default Constructor. A default constructor that sets radius to0.0.
• Constructor. Accepts the radius of the circle as anargument.
• setRadius. A mutator function for the radius variable.
• getRadius. An accessor function for the radius variable.
• getArea. Returns the area of the circle, which is calculated asarea = pi * radius * radius
• getDiameter. Returns the diameter of the circle, which iscalculated as diameter = radius * 2
• getCircumference. Returns the circumference of the circle,

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post