Circle class in java
Posted
by user292395
on Stack Overflow
See other posts from Stack Overflow
or by user292395
Published on 2010-03-19T09:43:04Z
Indexed on
2010/03/19
9:51 UTC
Read the original article
Hit count: 194
I need to get the Java code for the below problem asap.
Create a class Circle that will allow us to define a circle with a specific radius. Your class should include the following methods:
- A constructor that can create a circle with a specified radius.
- A method setRadius that sets a specific value as a new radius for an existing circle.
- A method getRadius that returns the radius of an existing circle.
- A method toString that returns a String with all the information about an existing circle.
- A method computeArea that computes the area of a circle
- A method computePerimeter that computes the perimeter of a circle.
© Stack Overflow or respective owner