I need a JAVA code created
- or -
Post a project like this3223
$25
- Posted:
- Proposals: 1
- Remote
- #801520
- Awarded
Description
Experience Level: Entry
Estimated project duration: 1 day or less
Create a class named Circle with field names radius, diameter, and area. Include a constructor that sets the radius to 1 and calculates the other two values. Include methods named setRadius() and getRadius(). The setRadius() method not only sets the radius, but calculates the other two values (as you know, the diameter of a circle is twice the radius, the area of a circle is pi multiplied by the square of the radius). Save class as Circle.java.
Create a class named TestCircle whose main method() declares several Circle objects. Using setRadius() method, assign one circle a small radius value (code a user input making use of Scanner of JOptionPane), and assign another a larger radius value (to be an input by a user as well). Do not assign a value to the radius of the third circle; instead retain the value assigned at object construction. Display all the values for three Circle objects. Save the class as TestCircle.java.
Note: Create an UML class diagram prior to coding the application.
Compile, run, and check the results. Submit the following:
The source .java files
An MS .doc file with explanations/comments of your solution and the results of a test run, including a screen shots pasted to the MS .doc file
The UML class diagram of the application included as a part of the MS .doc above
Create a class named TestCircle whose main method() declares several Circle objects. Using setRadius() method, assign one circle a small radius value (code a user input making use of Scanner of JOptionPane), and assign another a larger radius value (to be an input by a user as well). Do not assign a value to the radius of the third circle; instead retain the value assigned at object construction. Display all the values for three Circle objects. Save the class as TestCircle.java.
Note: Create an UML class diagram prior to coding the application.
Compile, run, and check the results. Submit the following:
The source .java files
An MS .doc file with explanations/comments of your solution and the results of a test run, including a screen shots pasted to the MS .doc file
The UML class diagram of the application included as a part of the MS .doc above
Joshua B.
96% (10)Projects Completed
13
Freelancers worked with
9
Projects awarded
80%
Last project
9 Apr 2020
Kuwait
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies