Question: I need to create a Circle.h file EXPECTED OUTPUT: Center: (0, 0) Radius: 1 Area: 3.14159 Center: (1, 2) Radius: 3 Create a C++ class

I need to create a Circle.h file

I need to create a Circle.h file EXPECTED OUTPUT: Center: (0, 0)

Radius: 1 Area: 3.14159 Center: (1, 2) Radius: 3 Create a C++

EXPECTED OUTPUT:

Center: (0, 0) Radius: 1 Area: 3.14159

Center: (1, 2) Radius: 3

Create a C++ class named Circle, which you should store in a file called Circle.h. Your class should have three private variables, namely x, y, and r, all of type double. The variables x and y will store the Cartesian position of the center of the circle and the variable r should store the radius. You should also add a public variable, area,which will store the area of the cirde. Ther should be two constructors, one that takes no arguments and instantiates a uunit circle centered at the origin. The second constructor should take in three arguments, namely x, y and r, and instantiate a circle of radius r, centered at (x, y)

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!