For a practice problem, I have to create an object called Window which have to hold the following operations:
1) Create a window
2) Bring a window to the top
3) Put a window to the bottom
4) Destroy a window
5) Output what percentage of a window is visible (i.e., isn’t covered by windows above it).
where the window is just a square with different x and y coordinates for its vertices. (note that this window is upright)
The problem I’m stuck with is that the ranges for the x and y coordinates are between 1 and 32767 inclusive so I can’t hold these windows in a 2-d array.
Is there any way/datatype I can use to hold these windows? Any help will be greatly appreciated. Thanks in advance!
NOTE: This is my first time being on this site, and I’m not sure what an appropriate question is, so could you guys tell me what this site is for, and if my question is not appropriate, which site I should migrate this to? Thanks.