Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1). Design, implement and test a Circle class. The Circle class should be writte

ID: 3673973 • Letter: 1

Question

1). Design, implement and test a Circle class. The Circle class should be written as a template class, so the user of the class can create Circle objects that have int, double or float data type for the one private member variable: radius.

There should be functions to set & return the value of the radius, a default constructor that sets the radius to zero, an overloaded constructor that passes in the value of the radius (... Circle bigCircle(20); ....), and functions that compute and return the area and the circumference of the Circle object. PI should be declared as a constant in the public area of the class definition. Write a test program to ensure the success of your class definition.

I'm having trouble writing and understanding my C++ program.

Explanation / Answer

//// here is the tempelate class for circle using color , you can change it for radius
/// hope this helps

/////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Compile and run: