810:061:02 - Spring 2003 - First 8 weeks


  1. Here is the BoxMidtermExam.java handout that was a supplement to the October 16th, 2002 Fall Exam One in Java class. Questions 3 thru 10 referred to this handout. See my office door (Wright 106) if you need the practice exam and lost your copy. Extra copies of this BoxMidtermExam Box class supplement are also taped to the door there.

  2. Here is your Lab 4 Yahtzee game assignment.

  3. How to do WHILE LOOPS and REPETITION in Java using the while statement. Also, ActiveObjects and animations material.

  4. While loops exercise and examples. Monday, 09/30 class exercise. Do the exercise on your own AGAIN before the Wednesday class. Can you think of several different ways to solve it?

  5. VIP Notice: February 27th Exam postphoned until Thursday, March 6th.

  6. Here is the Big Java Coin Purse class and demonstration applet. You received this as a handout on Thursday, February 20th.

  7. Chapter 4 - Defining your own classes - T-Shirts example.

  8. Parameters, Contructors, PIVs - T-Shirts followup. Wednesday, September 25th, 2002 class (February 18th-20th, 2003) - Local variables, PIVs (Private Instance Variables) and Parameters are the big three categories of data you will see inside of any class definition.

  9. Followup to 02/11 class: Example from Tuesday, February 11th class - Remainders and MOD 2, MOD 3 example is POSTED HERE now. It includes some code that does counting of OK and WRONG guesses.

    Counting and Java counters and a tribute to C++. Counting the correct and incorrect guesses.

  10. Assignment (Program) #3: Lab #3: Laundry Sorter handed out in class on February 4th.
    Due on - TUESDAY, February 18th in class at 11 a.m.

    Laundry Sorter Lab Assignment: Due on Tuesday February 18th by the start of class.

    Demo Part A: See the running applet for Part A of the Laundry Sorter assignment.

    Demo Part B: See the running applet for Part B of the Laundry Sorter assignment.

  11. Scribble and RGB colors example (for 02/04/Tuesday).

  12. Thursday, January 30th: Mouse dragging group exercise solution.
    1. Suppose that we would like to indicate the distance the mouse has been dragged LEFTward or WESTward since dragging LEFT has been started.
    2. Suppose we want the distance RIGHTWARD or EASTward to be shown and constantly updated since we have been dragging RIGHTWARD.
    3. How would you do this? Go look at and play with the Applet and think about what would be required to do this before you look at the Java code that is also there.

  13. Here is the 2nd assignment, LAB 2, which is due on February 4th. HERE is the LINK TO DOWNLOAD the THREE files for lab2.

  14. Java and jGrasp and objectdraw.jar and Big Java textbook examples. Vip handout from class #4, January 23rd, 2003.

  15. Williams College manuscript ObjectDraw blue sheet quick reference.

  16. Tentative Spring 2003 COURSE OUTLINE with week by week readings, exam dates, tentative assignment due dates, and suggestions for how to achieve the most success and enjoyment from Computer Science I. Note: Spring dates not ready yet, but the order will be generally the same as fall semester, week by week.

  17. TA HELP SCHEDULE READY NOW: Graduate students 810:061 Java help hours in Wright 339 public computer lab.

  18. If you want to DOWNLOAD jGrasp and the Java SDK for your PC, follow these instructions.

    Additional SDK Compiler instructions only if you had problems getting it to work, and are sure the problems are not related to needing objectdraw.jar for Williams textbook.

    Read this for: Problems with jGrasp, or problems with installing the Java SDK compiler, or just for problems with using the William's College objectdraw package here in Wright Hall or at home on your own PC. The project file has to specify objectdraw if you want to do FilledRects and FramedOvals and stuff from Williams College package! Use any of the project files provided for 810:061 labs and assignments and you will be fine.

  19. Review of lecture #2 and PREVIEW of ASSIGNMENT #1. Look this over BEFORE the 3rd class, before Tuesday, January 21st hands-on class.

    Note: For those ambitious students who want to see if their jGrasp is working, the above links to the 3 files that would allow you to see jGrasp in action, including instructions on how to download, how to compile, etc. Find the Downloading the files link.

    Note 2: More about the Compiler Settings for doing Java with William's College objectdraw and jGrasp. (Ignoring this material is OKAY!).


  1. HelloWorld class - Java code and running application. Try it out. We will develop it further and talk about it more in class #2.

  2. How could the HelloWorld class be modified so that the canvas was only cleared if the user clicked at the very top of the window?

    3 p.m. 01/28/Tuesday NEW: Study this Tuesday, January 28th SOLUTION. It goes beyond what we did in class earlier the same day, but is related to that starting point.

    Think about and try to work out how you would do some of the following tasks? (See items 3, 4 and 5 that follow immediately here).

  3. Or say clicking in the upper left-hand corner of the window would cause the canvas to be "erased" or cleared, instead of another new Go Panthers message showing up?

  4. How could the Go Panthers messages be made different colors, instead of just one color?

  5. How could the Go Panthers messages be made with a larger font size each time the user clicks? Say the first one is size 10, the 2nd could be size 12, the 3rd size 14, and the 4th font size 16 and so on.

Example for week 2 handout: FilledRect, Text and Line example for class #3 handout - and good class #2 review too! This handout is already prepared, so I will tape a few copies to my office door (Wright 106), in case you want to get it ahead of time.