Question: Create the following classes with the UML in JAVA. with a superclass point. Class _Point - No argument constructor used to initiate an x and

Create the following classes with the UML in JAVA. with a superclass point.

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

Class _Rectangle

- Two argument constructor used to set the width and height of the rectangle

- Four argument constructor used to set a rectangle at (x,y) point with specific width and height

- toString should print the position, height, width, area and circumference for the create rectangle

- The next equations used for certain methods.

Area= w * h Circumference= 2*(w+h)

Create the following classes with the UML in JAVA. with a superclass

_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 _Rectangle - height: Double - width : Double constructor Rectangle(Double :w, Double :h) constructor Rectangle(Int: x, Int : y, Double :w, Double :h) + setHeight(Double : h) : void + setWidth(Double : w) : void + getHeight(): Double + getWidth(): Double +getArea(): Double + getCircumference(): Double + toString(): void

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!