CSE 132 (Spring 2010)
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 XXXXX to your username that you use to log into cec computers. For example, jdl2.
    • Change YYYY to your last name, exactly as it is shown in WebSTAC, with capital letters as shown, but without any quotes or spaces.


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

    • 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.
      Please keep your ID number a secret! Your workspace is intended to be used by you alone at this point.

    OK, click Finish to get the repository location validated.

    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

  1. Fill out the cover-page.txt file completely.
  2. Commit your work to the repository.
  3. Grab a grade sheet, fill it out, and show what you did to a TA. Get him or her to sign the sheet.

Last modified 08:58:56 CDT 03 June 2010 by Ron K. Cytron