CSSE 220: Object Oriented Software Development
Exam 2 RE-TEST, Spring 2008-2009

The Problems

  1. Read the rules for this exam.
  2.  

  3. Implement and test a new project called Exam2Retest that implements this UML class diagram, Stage 1.

    Grading rubric — 10 points, as follows: 5 points if the tool tips work, 5 points if everything else works. But no points if you do not follow the UML class diagram, Stage 1.

  4.  

  5. Implement and test the addition of a single LightGrayPanel (PANEL, not button!) to the CyanPanel as described in this UML class diagram, Stage 2.

    Grading rubric — 15 points, as follows: 3 points if the panel appears as specified, 12 points if it acts as specified. But no points if you do not follow the UML class diagram, Stage 2.

  6.  

  7. Revise your project so that:

    1. Instead of a single LightGrayPanel, the CyanPanel displays 40 LightGrayPanel's (each of which acts just like the LightGrayPanel described in the previous problem).
    2. Furthermore, clicking the mouse anywhere in the CyanPanel (except on a LIGHT_GRAY subpanel) should cause ALL the LightGrayButton's on the CyanPanel to change their color as if they had just been clicked themselves.

    Grading rubric — 25 points, as follows: 5 points if clicking the mouse toggles the color of at least one of the LIGHT_GRAY panels, 20 more points if clicking the mouse toggles the color of ALL of the LIGHT_GRAY panels on the CyanPanel.

  8.  

  9. Implement and test the following (partial credit is available):

    1. A BluePanel class and WhitePanel class as described in this UML class diagram, Stage 4.
    2. A BluePanel is on the PinkPanel, and a WhitePanel is on the BluePanel.
    3. The BluePanel is blue and is 100 x 100 (not 50 x 50). The WhitePanel is WHITE.
    4. Every YellowPanel should have a new LightGrayPanel (so a single LightGrayPanel shows up in the LEFT YellowPanel, and a single LightGrayPanel shows up in the RIGHT YellowPanel).
    5. The WhitePanel in the BluePanel has-a the sole LightGrayPanel in the LEFTMOST of the two YellowPanel's.
    6. Clicking the WhitePanel does ALL of the following:
      • It behaves like a LightGrayPanel (i.e. clicking on the WhitePanel changes its color to RED unless it already is RED, in which case clicking on the WhitePanel changes its color to LIGHT_GRAY).
      • Additionally, clicking on the WhitePanel changes the background color of the CyanPanel to GREEN. (Don't bother to change the Tool Tip.)
      • Additionally, clicking on the WhitePanel causes the sole LightGrayPanel in the LEFTMOST YellowPanel to behave as if it were clicked (i.e., it changes its color to RED unless it already is RED, in which case it changes its color to LIGHT_GRAY).

    The new part of the UML for this stage is shown in gray in that diagram.

  10. Here is what your project should look like after completing this step:

    Grading rubric — 30 points, as follows:

     

  11. Implement and test the addition of a single JButton to the PinkPanel, where the JButton responds to itself via an anonymous class by changing its text to "goodbye".

    Here is what your project should look like after completing this step:

    Grading rubric — 10 points, as follows: 10 points if the button responds to itself successfully via an anonymous class, else no credit.

  12.  

  13. Implement and test the addition of a BlackPanel to EVERY YellowPanel as described in this UML class diagram, Stage 6.

    Grading rubric — 10 points if the BlackPanel behaves as specified.

  14.  

  15. Turn in your work by committing your Exam2Retest project to your individual repository:
    • Right-click on your Exam2Retest project in Eclipse.
    • Select   Team ~ Share Project
    • Follow your nose, choosing/typing your individual repository name like this:
          http://svn.csse.rose-hulman.edu/repos/csse220-200930-mutchler/Exam2Retest
      
      but replacing mutchler with your own username.
    • Finally, right-click on your Exam2Retest project and do a   Team ~ Commit   to commit the work.