|
-
Mar 9th, 2010, 09:32 PM
#4
Thread Starter
Member
Re: Getting errors in this program...any ideas?
The more corrections I make, the more errors I get. I think I need to start this over from scratch. This should not be that difficult, but it is for some reason. Here is what I am supposed to accomplish with this program according to the book I am using:
Create a class named Circle with a field for the radius. Be sure to include the following
• a default constructor that sets the radius to 1
• a method to set the value of the radius
• a method to return the value of the radius
• a method to compute and return the circle's diameter
• a method to compute and return the circle's area
Recall that the diameter of a circle is twice its radius and that the area of a circle is 3.14 times the square of its radius.
The Circle with radius 10.0 has diameter 20.0 and area 314.0.
The Circle with radius 1.0 has diameter 2.0 and area 3.14.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|