Quote
These were applets for a course I am taking at North Hennepin Community College.
To view the source code, click the link under each applet. Some were written in netbeans, but most were written
in Notepad or emacs.
Motto, quote or poem assignment
Quote.java | Top
House
Exercise 3.3 - Draw a house
House.java | Top
Bargraph
Exercise 3.4c - Draw a bargraph
Bargraph.java | Top
Target
Exercise 3.5 - Draw a target, with a point value in each layer
Target.java | Top
Exersize 4.2
Exercise 4.2 - Calculate circumference, area and volume given the radius, and draw a picture of a circle
Project4_2.java | Top
Flags
Draws the flags of Canada, where I am from, and Finland, where Linux is from.
Flags.java | Top
Thermometer
Contains methods for converting fahrenheit to celsius (and vise versa), and displays a nifty thermometer using these methods.
Thermometer.java | Top
Family
Has a `person' method, which is passed a parameter to determine the `size' of the person (in this case, adults and children), and the color. If they were all children, perhaps they should have been red and yellow, black and white. Any resemblance to the DRI logo is probably a coincidence.
Famile.java | Top
Faces
This uses a happyFace method and a sadFace method, and randomly deposits six of each of them in the applet. If it looks all messed up to you, that's because it was trying to `randomly' place faces while you were scrolling down the page. To see it look nicer, click the link below to the `top', and then click the link to `Faces'. Also, you can close and open your browser window, or refresh/reload the page.
Faces.java | Top
Chessboard
Loopy.java
This is a chess board applet. It accepts a size argument in {2, 3, ..., 15} and places a few chess pieces on the board for good measure. The pieces are not placed logically.
Also, since the pieces are placed randomly with a probability of P(1/2) that any one square will have a piece on it at all, it will be observed that very small boards (eg, 2x2) will sometimes appear to have no pieces on them at all. This is not a bug, it is expected behaviour, given that on a 2x2 board, with only two white squares, there will be no pieces 1/4 of the time (probably).
The chess .gifs are black, and do not show up on the black squares. This is also expected behaviour, and should not be a cause for alarm.
Stoplight
StopLight.java
This is a simple applet that lets you play with the traffic light. To make it a little better looking, I tried using some methods from the java2D API.