Homework 4 - Graphical User Interfaces


[Homepage] | [General Lab Info] | [TA's & Tutors] | [FAQ's] | [Homework] | [Excellent Programs] | [Exams]

Reading: Chapter 8.

Due At 8:00am, February 12, 2001, submit is turned off automatically. Work turned in after that time will not be accepted for grading.

Program Description - A Guessing Game

Complete exercise 21 at the end of Chapter 8 in Java by Dissection.

Write a program to play a number guessing game. The player thinks of a number between 1 and 100 and the computer tries to guess. After guessing correctly, the computer should display the number of guesses it took. The game should use a graphical user interface. The GUI must include a text field to show the computer's current guess and three buttons labeled Correct, Too Big, and Too Small. As an added feature, allow the user to specify the initial range before generating the first guess. You can do so with two additional text fields. Be sure to use labels on the text fields to make your program easy to use. After the user clicks the Correct button, the game should start over.


[Homepage] | [General Lab Info] | [TA's & Tutors] | [FAQ's] | [Homework] | [Excellent Programs] | [Exams]

This page maintained by Charlie McDowell. Email regarding this site.