Use a random number generator to generate card values. This will be discussed in class.
The program should loop until the user enters a 0 to exit the game.
Create program documentation as game.doc or game.txt. You may use this sheet as partial documentation but should still write an algorithm and constants/variables for each function. Include a module structure chart as well. The main function will be designed and written during class.
Use the standard program header as shown in Program 2 (Use the one given to you).
Comment your program for readability and ease of maintenance. Include purpose, preconditions, postconditions and data flow documentation for each function.
Test your program thoroughly.
Cards (1-9, 0 exits) : -1 Cards (1-9, 0 exits) : 10 Cards (1-9, 0 exits) : 9 A ------> 9 9 9 9 9 9 9 9 9 = 90 B ------> 9 9 9 9 9 9 9 9 9 = 90 Draw. -or- A wins. -or- B wins. Cards (1-9, 0 exits) : 0 Goodbye!
Place your source file and documentation file in your H:\CP1\Java\BookClasses\ folder by the due date.
This page maintained by bobh@hesston.edu