Reference no: EM132430812
Make a UML diagram for a Box class with the following requirements:
1. Design a Box class as follows.
a. Two private constants (private static final):
i. MIN_X, an integer with a value of 0, which represents the minimum x value of the box.
ii. MIN_Y, an integer with a value of 0, which represents the minimum y value of the box.
b. Two private final instance variables:
i. maxX, an integer which represents the maximum x value of the box.
ii. maxY, an integer which represents the maximum y value of the box.
c. Two private non-final instance variables:
i. x, an integer with a default value of MIN_X which represents the current x position of the box in the grid.
ii. y, an integer with a default value of MIN_Y which represents the current y position of the box in the grid.
d. A required constructor with parameters to set maxX and maxY.
e. Two public accessor "getter" methods for x and y.
f. A public void method named "push" which accepts a Vector object as a parameter. This will change the box's x and y values according to the vector direction and magnitude.