Question: Java Object Oriented Create a class that models a rectangle located in the first Cartesian quadrant. The class should store information about a rectangle such

Java Object Oriented

Create a class that models a rectangle located in the first Cartesian quadrant. The class should store information about a rectangle such that it can be drawn in an X,Y cartesian coordinate system, including rectangles which are not aligned parallel to the X-Y axes, that is, they are oriented making an angle with the X axis.

Your class should provide one constructor methods for specifying the rectangle The constructor should receive the rectangle area, the length of the long side, the angle that the long side makes with the X axis, and the coordinates for the vertex closer to the origin and the X-axis.

Your class should provide methods for (computing and) returning the area of the rectangle

Your class should provide methods for (computing and) returning the length of short and long side sides of the rectangle

Your class should provide methods for (computing and) returning the angle it's long side makes with the horizontal (x axis)

Your class should provide methods for (computing and) returning the coordinates for all the corners of the rectangle starting with the coordinate closer to the origin and traversing the rectangle in counter clockwise order.

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!