Question
for a java programming one class with the most simple code possible please. I got it wrong on thetest and dont understand it. Write a
for a java programming one class with the most simple code possible please. I got it wrong on thetest and dont understand it. Write a class to represent colored circles of various sizes on a position on a grid. The position is represent by an x -coordinate and a y-coordinate. Coordinates are not negative. The size is represented by the radius of the circle. Valid colors are red, green, or blue. Your circle class should have the following: The appropriate instance fields [20 points] Constructor [10 points] Copy constructor [10 points] Equals [10 points] toString [10 points] compareTo which compares the sizes of the circles [10 points] intersect which determines whether a circle intersects another circle on the grid [Extra Credit 20 points]. [10] Write a very simple program that creates two circles and calls each of the methods in your class to show that they work. (Do not create the tester that we use in most homework.) [10 Points] Write a UML diagram for your circle class. This should be done before writing any code. Upload your UML diagram, all of your java code, and a snip of the output to show that your code works.
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