• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Java project help

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.
 

Easy Rhino

Linux Advocate
Staff member
Joined
Nov 13, 2006
Messages
15,448 (2.42/day)
Location
Mid-Atlantic
System Name Desktop
Processor i5 13600KF
Motherboard AsRock B760M Steel Legend Wifi
Cooling Noctua NH-U9S
Memory 4x 16 Gb Gskill S5 DDR5 @6000
Video Card(s) Gigabyte Gaming OC 6750 XT 12GB
Storage WD_BLACK 4TB SN850x
Display(s) Gigabye M32U
Case Corsair Carbide 400C
Audio Device(s) On Board
Power Supply EVGA Supernova 650 P2
Mouse MX Master 3s
Keyboard Logitech G915 Wireless Clicky
Software The Matrix
i think what they mean is that they want your classic rectangle, not something like a parallelogram.
 
Joined
Dec 2, 2009
Messages
3,351 (0.64/day)
System Name Dark Stealth
Processor Ryzen 5 5600x
Motherboard Gigabyte B450M Gaming rev 1.0
Cooling Snowman, arctic p12 x2 fans
Memory 16x2 DDR4 Corsair Dominator Pro
Video Card(s) 3080 10gb
Storage 2TB NVME PCIE 4.0 Crucial P3 Plus, 1TB Crucial MX500 SSD, 4TB WD RED HDD
Display(s) HP Omen 34c (34" monitor 3440x1440 165Hz VA panel)
Case Zalman S2
Power Supply Corsair 750TX
Mouse Logitech pro superlight, mx mouse s3, Razer Basiliskx with battery
Keyboard Custom mechanical keyboard tm680
Software Windows 11
Benchmark Scores 70-80 fps 3440x1440 on cyberpunk 2077 max settings
too late bro
you better learn these things yourself, since it is your best friend
search youtube videos for java, as they will help rapidly
 
Last edited:
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
i think what they mean is that they want your classic rectangle, not something like a parallelogram.

I feel as if I am just being dense however when it states:

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.

It seems as if it is talking about both sides (horizontal and vertical) projecting to a single point/interval.

Do I just have a single closed interval representing x and another for y. I am not sure if I am overthinking the terminology or not as my professor teaches most of the java courses here and tends to expect quite alot out of us on occasion.
 

Easy Rhino

Linux Advocate
Staff member
Joined
Nov 13, 2006
Messages
15,448 (2.42/day)
Location
Mid-Atlantic
System Name Desktop
Processor i5 13600KF
Motherboard AsRock B760M Steel Legend Wifi
Cooling Noctua NH-U9S
Memory 4x 16 Gb Gskill S5 DDR5 @6000
Video Card(s) Gigabyte Gaming OC 6750 XT 12GB
Storage WD_BLACK 4TB SN850x
Display(s) Gigabye M32U
Case Corsair Carbide 400C
Audio Device(s) On Board
Power Supply EVGA Supernova 650 P2
Mouse MX Master 3s
Keyboard Logitech G915 Wireless Clicky
Software The Matrix
I feel as if I am just being dense however when it states:

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.

It seems as if it is talking about both sides (horizontal and vertical) projecting to a single point/interval.

Do I just have a single closed interval representing x and another for y. I am not sure if I am overthinking the terminology or not as my professor teaches most of the java courses here and tends to expect quite alot out of us on occasion.

call your professor or a classmate.
 
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
So I found out that a large portion of my problem is that my professor provided the supplementary material for this project incorrectly which prevents us from accessing the code we require, I am kind of conflicted about what to do as I am unsure of just how professional my professor will be when this is brought to his attention, should I not worry about this project since the reason my class can't complete it is on him and assume he won't grade it? Or should I request in our final class tomorrow that he either doesn't take it as a grade or that he fixes his mistake and allows us to submit it the following week?
 
Top