Java Reference
In-Depth Information
Your program should read in a quiz file, prompt the user for responses to
all questions, and grade the responses. Follow the design process that
was described in this chapter.
΢΢΢G Exercise P12.11. Implement a program to teach your baby sister
to read the clock. In the game, present an analog clock, such as the one in
Figure 12 . Generate random times and display the clock. Accept guesses
from the player. Reward the player for correct guesses. Af ter two
incorrect guesses, display the correct answer and make a new random
time. Implement several levels of play. In level 1, only show full hours.
In level 2, show quarter hours. In level 3, show five-minute multiples,
and in level 4, show any number of minutes. After a player has achieved
five correct guesses at one level, advance to the next level.
582
583
Figure 12
An Analog Clock
΢΢΢G Exercise P12.12. Write a program that can be used to design a
suburban scene, with houses, streets, and cars. Users can add houses and
cars of various colors to a street. Write more specific requirements that
include a detailed description of the user interface. Then, discover
classes and methods, provide UML diagrams, and implement your
program.
΢΢΢G Exercise P12.13. Write a simple graphics editor that allows
users to add a mixture of shapes (ellipses, rectangles, and lines in
different colors) to a panel. Supply commands to load and save the
Search WWH ::




Custom Search