Java, Java, Java 3E

Chapter 7: Strings and String Processing

Ch 7 Lab: Secret Word

Click here to read the lab writeup

Brief description

Write a class that manages the String processing for an applet that lets the user make repeated guesses at the letters contained in a secret word. The secret word is shown in masked form. Each time the user makes a guess, the applet reports whether the guess is correct or not and displays the updated version of the secret word.

This lab emphasizes use of the String class and string processing algorithms. It provides good practice with coding loop algorithms. It uses a provided applet interface. Successful completion of this lab could be used as a preliminary assignment to completing Exercise 7.15 at the end of Chapter 7 in Java, Java, Java 3E.

The objectives of this lab are:

The following demo program illustrates the program's operation:


Secret Word Guessing Game