- Joined
- Sep 18, 2011
- Messages
- 1,743 (0.38/day)
- Location
- Asheville, North Carolina
System Name | Red Giant |
---|---|
Processor | Intel Core i7-12700K |
Motherboard | MSI Pro Z690 |
Cooling | Corsair H100i elite |
Memory | Corsair Vengeance Pro 32GB |
Video Card(s) | MSI 4070TI Super |
Storage | 960 GB Sandisk SSD |
Display(s) | 27 inch Predator 144 hz 2k |
Case | CoolerMaster HAF X |
Audio Device(s) | Onboard |
Power Supply | Corsair AX1200 |
Mouse | Logitech G502 Hero |
Keyboard | Corsair K95 Platinum |
Software | Windows 11 Pro |
Write a Rectangle class that uses the ClosedInterval class provided (that code is unviewable). An instance of the Rectangle class models a rectangle in the x/y plane. A key feature is that your Rectangle class must represent a rectangle using ClosedInterval objects. We are considering only rectangles whose edges are parallel with the x- and the y-axes. Consider such a rectangle { its horizontal sides project down to the x-axis to a single interval. Similarly its vertical sides both project over to the y-axis as a single interval. Thus, the rectangle can be viewed as the intersection of the region in the x/y plane specified by that y-axis interval intersected with the region in the x/y plane specified by that x-axis interval.
The Rectangle class must have the following public members. Your class should also have any private fields and private methods that you feel are needed.
1. A constructor that takes two ClosedInterval parameters and initializes the fields of the object as appropriate. The first parameter is the ClosedInterval object that represents the closed interval that is the projection of the Rectangle onto the x-axis. The second parameter is the ClosedInterval object that represents the closed interval that is the projection of the Rectangle onto the y-axis.
I am trying to do this project before midnight EST and am a bit confused by the terminology I have bolded, any simpler explanation of what is being asked would be very helpful as I am striving for an A in my first Java class.
The Rectangle class must have the following public members. Your class should also have any private fields and private methods that you feel are needed.
1. A constructor that takes two ClosedInterval parameters and initializes the fields of the object as appropriate. The first parameter is the ClosedInterval object that represents the closed interval that is the projection of the Rectangle onto the x-axis. The second parameter is the ClosedInterval object that represents the closed interval that is the projection of the Rectangle onto the y-axis.
I am trying to do this project before midnight EST and am a bit confused by the terminology I have bolded, any simpler explanation of what is being asked would be very helpful as I am striving for an A in my first Java class.