HW4: creating an application
Due: Wednesday 11/21/2001
[8 points]
The purpose of this homework is to give you experience using many of
the JLIB components, containers, and procedures. Your applet
can "do" anything you want as long as it contains all of the
required elements listed below in the precise grading guide.
Some examples are:
- A quiz game. For example, a Jeopardy-like applet where the
user clicks a button in a grid and
a question gets written in a textarea. User types in answer into a textfield
or selects a multiple choice answer with a choice, etc.
- An educational applet. For example,
a program to help children learn their addition or multiplication
tables. (Use (random) to generate problem instances, keep track of score, etc.).
- An interactive story. User helps create story using a control window.
Applet shows each new "chapter" in browser window. User can make choices
for the protagonist and effect the outcome of the story.
- Etc.
Since everyone can look at everyone else's web pages (and this is encouraged),
you should try to be creative in your applet.
If you do decide to use any ideas you got from someone elses website, we are asking
you to provide a link to that website.
Tools for developing your program:
Note: you can look at other
peoples applets to get ideas, but
"do not copy their code."
A good rule of thumb
is to take a 10-15 minute break after looking at someone elses homework before you
work on your own applet. Also, do not make a machine copy (i.e. cut and paste) of
another student's homework.
You can also look at the applets that students have submitted in past years,
(
Sum01
Aut00
Sum00
Aut99,
Aut98)
but be aware that they were using a different version of Scheme, and their homework
assignment was somewhat different.
So their programs will not work with the current Scheme interpreter and would not
receive full credit for the Aut00 CS2a hw4 anyway.
Precise specification of the Homework
- [3.0 pts] Components. The homework should contain at least one of each of the following components:
- (0.5) A label (with a font and color specified)
- (0.5) A textarea
- (0.5) A button
- (0.5) A textfield
- (0.5) A "File" menu with a "quit" item and a Help menu with an "about" item
that pops up an "about" window containing your name and the date.
- (0.5) A choice.
- [2.5 pts] Actions
- (0.5) The buttons should do something noticeable when they are clicked.
- (0.5) The choice components should do something when one of its items
is selected, and it should do different things for different items, i.e.
use an if statement in the action.
- (0.5) The menu items should all respond when they are selected.
- (0.5) You should also have an action on at least one of the textfields
(so when you hit return in the textfield it does something noticeable with what
you typed in.)
- (0.5) At least one of your actions should append something to the textarea.
- [2.5 pts] Layouts. You should use each of the layout operators
- (0.5) (border (north ...) (center ...) (east ...) (west ...) (south ...))
- (0.5) (row ....)
- (0.5) (col ....)
- (0.5) (grid NUMROWS NUMCOLS a1 .... an)
- (0.5) (table NUMROWS NUMCOLS a1 ... an)
Important Note:
If you build your applet by looking at someone else's program and using some
of their ideas, then you need to explicitly reference them (give their name
and a link to their applet). You will only be given credit for those parts
of your program which are different from the ones that you cite.
Sample programs to look at and run
View all demos at once
Submitting your homework
Lift your homework to the server and name it hw4.applet.
Include a link from your hw4.html page to the hw4.applet page.
The hw4.applet page should contain links to the pages you have used
when building your own applet.