Question
Given the following code in C ++: Circle class: { private double centerX; double CenterY; double radius; public setCenter (double, double); setRadius (double); } Instructions:
Given the following code in C ++:
Circle class: { private double centerX; double CenterY; double radius; public setCenter (double, double); setRadius (double); }
Instructions:
Re-write the previous class correcting possible errors.
Add the following member functions. Show your code in three files.
* Builders (with argument / without argument) * Define the Copy Constructor * Mutators (set's) and Accessors (get's) * Incorporate the use of the "this" pointer in its implementation (waterfall effect) * Calculate the diameter (d) of the circle (r = 2d) * Calculate the area of the circle (Area = pi r ^ 2) * Calculate the circumference (Circumference = 2pi r ^ 2) * Print the Standard function (x-h) ^ 2 + (y-k) ^ 2 = r ^ 2 of the circle whose center C (h, k), with its other components. * Where r = radius of the circle * invoke your main program demonstrating the use of each function. * UML diagram
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