To Previous Chapter To Table of Contents To Bottom of Page To Next Chapter

CS 335/535 Web Programming - Week 11-15

You need to select 80 points of problems among the following. [These are all to be posted on your web site by April 30, 1999]
(All indicated point values are maximums)

  1. (20 pts) Write a Java applet that simulates the race of the tortoise and hare (or other "animals" of your choice). Use threads for each animal. [Extra 10 points for incorporating sounds]

  2. (20 pts) Write a Java applet that bounces a colored ball inside an applet. Initiate the ball with a mouseDown event. When the ball hits the edge of the applet, it should bounce off the edge at a randomly selected angle. [Extra 10 pts if you include a user-specified coefficient of restitution; Extra 10 pts if your ball causes a "boing" sound when it hits the wall or floor.]

  3. (20 pts) Create a general-purpose Java animation applet. Your applet should allow the user to specify the sequence of frames to display, the speed at which the images are displayed, and audios that should be played while the animation is running.

  4. (20 pts) Record audio for a large number of nouns, verbs, articles, prepositions, etc. Then use random number generation to forms sentences and have your program speak the sentences.

  5. (20 pts) Write a Java applet that deals and displays a five-card poker hand. [Extra 20 pts if it deals and displays two five-card poker hand, evaluates the two hands and determines which hand is better.]

  6. (15 pts) Write a Java applet that generates random limericks. [Extra 20 pts if your program actually says the limericks].

  7. (15 pts) Write a Java applet that encodes English language phrases into pig Latin.

  8. (30 pts) Write a Java applet that reads in several lines of text and
    • displays a table indicating the number of occurrences of each letter of the alphabet.
    • displays a table indicating the number of occurrences of words of lengths 1, 2, ...
    • displays a table indicating the number of occurrences of each word.

  9. (30 pts) Write a Java applet that reads in a check amount in dollars and cents and writes it back in words.

  10. (15 pts) Write a Java applet that reads an English expression and encodes it into Morse code and vice-versa.[Extra 20 pts if your program uses sound to "play" the Morse code].

  11. (50 pts) Write a Java applet that accepts English text and checks the spelling.

  12. (15 pts) Write a Java applet that acts as a standard hand-held calculator. [Extra 10 pts. for converting the calculator to a scientific calculator].

  13. (15 pts) Write a Java applet that "morphs" one image into another.

  14. (60 pts) Develop a "newspaper of the future" in which your user uses a GUI to design a customized dynamic newspaper which meets the user's unique information needs. Have your applet "harvest" information from WWW at the designated intervals and display it.

  15. (40 pts) Write a Java applet that simulates a kaleidoscope which appears to reflect graphics. Incorporate audio effects that "mirror" your applet's dynamically changing graphics.

  16. (60 pts) Write a Java applet that generates and manipulates jigsaw puzzles. Your user specifies an image. Your applet loads and displays the image, then breaks the image into randomly selected shapes and then shuffles the shapes. The user then uses the mouse to move the puzzle pieces around until the puzzle is solved. You may wish to add appropriate sound effects.

  17. (60 pts) Write a Java applet that simulates any of the following:
    • Roulette complete with an animated spinning roulette wheel and sounds.
    • Craps complete with rolling dice and sounds.
    • One-Armed Bandit complete with spinning wheels and sounds.

  18. (15 pts) Write a Java applet that someone might use to create a fireworks display.

  19. (20 pts) Write a Java applet that will help someone arrange the furniture in the room.

  20. (60 pts) Write a Java applet that plays the Xchange game. One or two players may play it at a time. Before the game begins, the computer will ask whether one or two players wish to play. The program will then manage one or two Xchange playing grids, depending on the answer to the mode question.

    THE GAME

    A playing grid consists of the first eight letters of the alphabet (A through H) and an asterisk, arranged in a three by three matrix like this:

    D H C
    B F *
    A E G

    For two players there are two of these grids side by side, and in the beginning they are identically scrambled. The method of play is to exchange the letters with the asterisk, one at a time, until the letters are put in their proper order with the asterisk trailing (lower right corner). There is one more rule: in a turn only a letter that is immediately to the left or the right of, or immediately above or below the asterisk may be exchanged.
    A move is the entry of just the letter; the program will then exchange the print positions of your choice and the asterisk. (In the example above, valid moves would be F, C, or G. If you are in the dual-player mode, your opponent is permitted to make an entry also before the two new grids are printed. When playing solitaire, there is only one board; so the updated output is nearly instantaneous after each entry.
    The program should display different grids each time it is played. There should also be a way for a player to gracefully exit the game if he/she can not solve the puzzle.

  21. (70 pts)Write a program which plays the Wampus game. "The wampus is a big hairy creature that will gobble you if he gets you."

    THE GAME

    The wampus lives in a cave. You are lost in his cave trying to find the only exist so that you can go home. There are twenty chambers in the cave and each has three passageways leading to other chambers. One of the tunnels does go to the cave's mouth, and when you find it you are free.
    There are hazards. In one chamber there is a deep pit. If you stumble into there you have had it. In three other chambers there are bats. You are afraid of bats, and when you encounter them, you take the nearest exit automatically. Normally you have time to ponder over which of the three tunnels to take next.
    When you wander into the wampus you have another choice. He is afraid of loud noises. You have six firecrackers. If you crawl into the chamber where he is you can make a hasty exit; or if you light the firecracker, he will take off to another chamber. You are safe for the moment. You don't know which tunnel he took, but neither does he know where you will go next. If you ever run out of firecrackers and happen to run into the wampus, he will eat you.
    You may give clues to the player, like "YOU CAN FEEL A DRAFT" when one of the tunnels lead to the cave mouth from the chamber you're in or "YOU SMELL A WAMPUS" if one of the tunnels leads to the chamber with the wampus.
    The program should place the wampus, pit, bats and exit in different chambers each time it is played. There should also be a way for a player to gracefully exit the game if he/she can not solve the puzzle.

  22. (70 pts) Write a program that includes a calendar, scheduler and alarm. Use audio and images. For example, applet should sing "Happy Birthday" to you when you use it on your birthday. Have the applet display images and play audio associated with important events. Have the applet remind you in advance of important events.

  23. (70 pts) Write a Java applet to play the MasterMind game.

  24. (25 PTS) Write a Java applet that allows the user to enter a city in a table and then sends back the local time for that city.

  25. (60 pts) Write a Java applet that provides customer service by a 911 dispatcher. Emergency personnel can move from place to place at the order of the dispatcher. The set of types of emergencies and the distribution of police, firefighters, and paramedics needed to handle the emergencies need to be included.

  26. (40 - 80 pts depending on complexity) Write a series of Java applets that provide a web-based tutorial about some computer related topic.

  27. (10 - 80 pts) Propose your own personal Java assignment.

To Previous Chapter To Table of Contents To top of page To Next Chapter