Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

_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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sql All In One For Dummies 7 Books In One

Authors: Allen G Taylor ,Richard Blum

4th Edition

1394242298, 978-1394242290

More Books

Students also viewed these Databases questions

Question

=+1. What are the organization's reputation goals on this issue?

Answered: 1 week ago

Question

Types of Interpersonal Relationships?

Answered: 1 week ago

Question

Self-Disclosure and Interpersonal Relationships?

Answered: 1 week ago