CSE 132 (Spring 2011)
Lab 1: Percenterator meets Mt Evans


In Studio 1, you developed a slider that can control a model that represents percentages, from 0 to 100%. In this lab, you attach three such sliders to control the percent of an image's red, green, and blue components that are copied from one panel to another.

Set up

  1. Work in pairs if you like, but be sure to fill out the cover-page.txt file to reflect accurately who worked on this lab.

  2. Start Eclipse: In CEC, click on the Start button and look under "All Programs", "Programming" to start up eclipse 3.4. The first time Eclipse starts, it will be slower than usual. You will be asked where you want your workspace to be.
    We recommend using the default location, and checking the box so you won't be asked again.
    After Eclipse starts up, click the 'X' on the "Welcome" tab at the top to close the welcome screen.

  3. Identifying your repository: If necessary, open the subversive tutorial in another window for the instructions on how to use subversion to load your repository in eclipse. If you need help with these instructions, ask a TA or another student to help you along.

    When you get to the point of entering the full and complete location of the repository, copy and paste the line below as the repository's URL:
    After pasting:
    • Change YYYY to your last name, exactly as it is shown in WebSTAC, with capital letters as shown, but without any quotes, spaces, or hyphens.


      • Smith → Smith
      • de Erausquin → deErausquin
      • O'Kelly → OKelly
      • Vera-Vazquez → VeraVazquez

    • Be sure the hyphen is still there, just after your last name and just before the ZZZZZZ.
    • Change ZZZZZZ to your student id number, all 6 digits.
      Although only you can access your repository, you should generally keep your ID a secret.

    • OK, click Finish to get the repository location validated.
    • When you are prompted for a username and password, supply your
      • WUSTL key username
      • WUSTL key password
      These are almost certainly different than your CEC login credentials. Your WUSTL key username and password are what you use to log into WebSTAC for registration.

      Be careful! If you provide a bad password repeatedly, your account will get locked out after a small number of such attempts. So be sure to follow these instructions carefully and ask if things are not working.

  4. Continue following the rest of the instructions in the subversive tutorial so that you are back in the Java view and have the project available for your use.
    Those instructions next ask you to Check Out a copy of the repository location so you can do the work for this lab. Be sure to right click on the whole project (your name and ID number) to do the checkout. Do NOT click on things below that like src.

  5. Look at your project: If you are back in the Java view, then you should see a project in the Package Explorer at the left side of the Eclipse window. The name of the project is the hyphenation of CSE132 with your last name and your student ID number.
  6. Open RGB.java in your lab1 package.
  7. You should see a copy of the percent package, similar to what you developed in studio.
  8. This RGB code won't compile until you initialize the green and blue instance variables. Each needs to be an instance of Controller, and each should be added to the RGB (as was done with red).
  9. Run the RGB as a Java application, and use the sliders to change the colors. You can move the sliders as you wish, and when you want to see the resulting picture, click the "go" button.

Pick one of the following

(Do two of them in your lab session by the time you demo to earn 10 extra lab credit points and the admiration of your TAs)
In whatever you pick, keep in mind that it is the model you should be affecting and examining.
Do not change the sliders or text field from your program; let them react on their own to changes you make to the model.

Demo and commit your lab

When you done with this lab, you must be cleared by the TA to receive credit.

If you worked in a team using a group– repository:
  • Your work must be committed in that repository for this demo.
  • Each team member must complete this form and have the TA authenticate.
    For example, if there are two of you, then the form must be submitted twice, so that each person's last name and 6 digit ID is captured with the repository name.
  • The repository name must be included on each of the submissions.

group– Enter the name of your group repository here
Last name 6-digit ID

TA: Password:

Last modified 21:08:35 CST 18 January 2011 by Ron K. Cytron