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

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!