please help me?

please help me?

Define a class named Circle with the following properties:

  1. List item

An integer data field named radius with protected access modifier, and a String data field named colour with private access modifier. Both data fields specify the radius and the colour of the Circle object respectively. Set the default values of radius to 1 and the colour as red.

A private static constant named PI with a fixed value of 3.142 that represents the value of pi.

A default constructor.

A constructor that creates Circle objects with the given radius value as the argument.

A public method to display the Circle object is data fields.

A public method named changeColour(String) to change the value of the Circle object is colour based on the value in the method argument.

A public method named getSurfaceArea() that calculates and returns the surface area of the Circle object. Use the constant PI value for the calculation.

A public method named getCircumference() that calculates and returns the Circle object is circumference. Use the constant PI value for the calculation.

Write another class named TestCircle to test the Circle program by creating two Circle objects. The first object must be created using the default constructor, while the second object must be created with the radius value of 8. Display the properties of both objects and also their surface area and circumference.

View Answers









Related Tutorials/Questions & Answers:
Please help with Jasper and Ireport - Struts
please help//
Advertisements
please help//
please help//
please help
help please?
help please?
help please?
help please?
help please?
Please Help
Please Help
Please help
java please please help
help please?
Please help
help please
please help
urgent...pleAse help me.....please!
please help me.
please help me.
please help me.
Confusion on Functions. Help Please?!
Please Help Now
please help me.
Please help me
PLEASE HELP WITH MY JAVA
help me please
please help me.
please help me
need help please
please help me
help please!!! T_T
please help me.
Please help me.
please help me...
please help me
please help me
please help me in these prog
New to Java Please help
ModuleNotFoundError: No module named 'me2'
ModuleNotFoundError: No module named 'mep'
please help me to this problem..
C Program....PLEASE HELP
PLEASE HELP CAPTCHA PROBLEM
Java Help Please
Please help me urgent...........
Please help in drawing Flowchart
Please Help - JSP-Servlet
Please help me

Ads