For Daily Free Study Material Join wiredfaculty Whatsapp Group | Download Android App | Ncert Book Download
Sponsor Area
Write the definition of a class RING in C++ with the following description:
Private Members - RingNumber // data member of integer type - Radius // data member of float type - Area // data member of float type - CalcArea() // Member function to calculate and assign // Area as 3.14 * Radius*Radius Public Members - GetArea() // A function to allow user to enter values of // RingNumber and Radius. Also, this // function should call CalcArea() to calculate // Area - ShowArea() // A function to display RingNumber, Radius // and Area