Notes
on assignment A1
|
|||||||||
1. The due date in now 18 September instead of 16 September. 2. About DateFrame. Class Date is in package java.util. Please look at the specification of its function getYear. Part of the assignment asks you to set this window's height to 120 + (d's year modulo 300). When you do this, use the value that function getYear gives you. Do NOT change it in any way. 3. About method getPartner of class FramingFrame The original handout that was on the website had some wording that was confusing some students, and it has been changed. Your class FramingFrame will have a field partnerFrame (you can choose whatever name you want) that contains the name of the manilla folder for the partner frame, the one that surrounds the original one. Method getPartner simply returns that variable:
The presence of this function allows the user to access the partner frame, to look at its width, height, origin, etc. So, we can do something like this:
For the fifth task, wrigin class CrossFrame, methods getTop, getBottom, getLeft, and getRight are there for the same purpose; each of these should return the name of the manilla folder for that partner. 4. Position and width of partner frames It is not difficult to get the size and position of the partner frames right. Just follow the specifications of the methods carefully. For the four partner frames for class CrossFrame, we gave the position of only one of them, thinking you could figure out the others. In order to remove any doubt, here is where these partner frames should be placed, assuming that the size of the main frame is (W, H) and the size of the partner frames is (w,h):
|
|||||||||
![]() |
![]() |