Write a Java class named circle which
contains:
Instance variables:
Radius of type double.
Color of type String.
Overloaded constructors:
Default constructor “no argument”.
Constrictor which takes two arguments (a double argument for
radius, a string argument for color)
a public method getArea() which return the area of the circle
based on the radius.
NOTE: the user will be enter the color and the radius So
use scanner .
Write a Java class named circle which contains: Instance variables: Radius of type double. Color of type String. Overloa
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am