•You will be
required to write programs like those on the first two exams (including one recursive function).
•
•Example class program:
• Write a Circle class to represent
circles.
• Your circle class must store the
radius of the circle in a private
data member called radius of type
float.
• Your circle class must define two public methods called diameter (2r) and area (3.14r2) that take no arguments and return the diameter and area of the circle defined by
radius in your circle
object.
• Give your circle objects a value for radius when they are created (i.e. with a constructor).
• Write a driver program to create two circles of radius 1.0 and 2.0. and which prints the area and diameter of your circles.