Line 6: What's the point of having diameter and circumference as members of the class? Why not simply calculate them when needed?
Line 8: Why are you setting the radius to 3.3 in the default constructor?
Line 9: What is the point of this line? It sets the member radius to the rsult of the function getRadius, which is the value of the member radius. i.e. You're setting member to itself.
Line 12: Same comment as line 9.
Line 15: Same comment as line 9.
Line 23: When changing the radius, the circumference and diameter need to be recalculated.
Line 28: When changing the diameter, you don't recalculate the radius and circumference.
Line 34: When changing the circumference, you don't recalculate the radius and diameter.
Header line 5: Extraneous semicolon after define.. Not detected since it's not used.
You probably should also have a a constructor that takes an explicit radius.
1 2
|
circle (double r)
{ radius = r; }
|