Question: c++ 5&6 5. Write the declaration for a class template named circle described as follows (do not define the member functions): Data members: only private

c++ 5&6
c++ 5&6 5. Write the declaration for a class template named circle

5. Write the declaration for a class template named circle described as follows (do not define the member functions): Data members: only private access. - radius - a numerical value. Member functions: under public access: - setradius - The function takes a numeric value of the type passed as template parameter as input and saves it in the radius data member. The function does not return anything. - calcperimeter - The function calculates the perimeter of the circle and returns the value as of type double. The perimeter of a circle is calculated as 23.14 radius. - calcarea - The function calculates the area of the circle and returns the value as of type double. The area of a circle is calculated as 3.14 radius* radius. 6. Complete the calcperimeter member function definition as described in the question given above

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!