Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Finding the distance between the centers of two circles object with radius 5 . 5 and center as ( 3 . 5 , 4 .
Finding the distance between the centers of two circles object with radius and center as Then test all the get methods, set methods, and the
distance method.
Grading: This lab is worth points. Out of maximum points, the UML will count for
points, the two source codes will count for points.
How to hand in the assignment
Follow the steps below:
Complete the UML in a Microsoft Word document or other document file format, and the
programs in java files. Once you are done, convert your UML file to a PDF pdf
Upload the java files as well as the PDF document UML into Gradescope. Do not
submit a docx file for the UML, first convert your file to PDF pdf
Click "Upload".
I remind you that if you do not submit the assignment before the due date, you will not be able to
submit it
Note: Your output should look exactly like the output below and should be able to run test
cases.
Circle s Radius:
Circle s CenterX:
Circle s CenterY:
Circle s Radius:
Circle s CenterX:
Circle s CenterY:
Distance from Circle to Circle:
Based on the following class:
Complete the Circle class by adding three sets of get and set methods for the three private data
fields. In the Circle class, add another instance method that is passed a reference variable for a
circle object and returns the distance between the circle that is passed to the method and the
current circle. Your distance method should have the following signature line:
public double distanceCircle c
The distance formula between any two points and is given by:
Requirements: Draw the UML of the new Circle class; Implement the Circle class; In
another program file, implement a test program for a new class named TestCircle with a main
method. Save the two program files as Circle.java and TestCircle.java.
In the main method of the TestCircle class, use the Circle constructors to create a first circle
object with the default radius use the noarg constructor for this and create a second circle
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started