Question
Create the following classes in JAVA with UML, with superclass Point. 1- Class _Point # No argument constructor used to initiate an x and y
Create the following classes in JAVA with UML, with superclass Point.
1- Class _Point
# No argument constructor used to initiate an x and y with a zero
# toString used to print the current point position
#Setter and getter for setting x and y
2- Class Circle
#A one argument constructor used to set points to (0,0)
# Three argument constructor used to set the points and the radius
# toString used to print the position, radius, area and circumference
# The next equations used to calculate the area and circumference
Area = pi r 2 Circumference = 2 pi r
3-Class Cylinder
#Two argument constructor used to set the cylinder's radius and height with point (0,0)
# toString used to print the position, radius, circle area, height, volume and surface area of the cylinder.
# This equations used to calculate the surface area and volume of a cylinder
Volume = pi r2 h Surface Area = 2 pi r h + 2 h r2
_Point -x: Int - y: Int constructor MyPoint() constructor MyPoint(Int: x, Int:y) + setLocation(Int: x, Int:y): void + setX(Int:x) :void + setY(Int:y) : void + getX(): Int + getY(): Int + toString(): void Extends Circle -radius: Double constructor Circle (Double :r) constructor Circle (Double : r, Int: x, Int:y) + setRadius (Double :r) : void + getRadius (): Double + getArea() : Double + getCircumference(): Double + toString(): void Extends Cylinder - height: Double constructor Cylinder (Double:r, Double: h) constructor Cylinder (Int: x, Int : y, Double : r, Double : h) + getSurface Area(): Double + getVolume(): Double + setHeight(h: Double): void + getHeight(): Double + toString(): void
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