X676: Rectangle

Given two Points a and b return a rectangle. You must compute the top-left corner of the rectangle and the desired width and height for the rectangle based on the points a and b. You should use this constructor:

Rectangle(int topLeftX, int topLeftY, int width, int height)

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.