Return to lecture notes index
15-100 Lecture 36 (Wednesday, April 27, 2005)
The Retake:

We will not be as generous in the grading as we were last time. Make sure that you compile as you go. Too many compilation errors will cause you to lose credit for the entire problem.

Try to avoid memorizing code. What is the process that I use to solve this problem? How do I codify that process?

The redo will take a similar format as the original. One question will require one traversal of the array with a simple manipulation or conditional logic (it will not be a toString again). Then there will be a slightly harder one which will take the majority of the test time for you to code.

Java Applets and GUI

Since we have a few classes before the semester is over, and there will be no more "Kesden" tests, we have a couple of days to do fun stuff. For this reason we are going to start to look at Java Applets. You will not be tested over this. We are going over it for the pure joy of gaining more knowledge of Java.

You can find notes on Applet commands and how to use them in a useful tutorial at:
So what are applets?

On the world wide web we can embed a program in the web page. It makes the page very flexible. The user can interact with it and the page becomes a lot more useful in general. However we don't want these programs to be able to access the computers' harddrives otherwise these programs could become very nasty viruses.

Thus java made the applet, which only has very limited access to outside (the user's computer's resources) and the user can very carefully control this access. In an applet you can do all similar things to what we have been doing all year print strings, run programs, etc, but in addition you can also make a user interface for your program with things like: buttons, beign able to "listen" to where the mouse is and what it's doing, draw shapes, display pictures, etc.