CS 350 - Programming Seminar I Fall 1997

INDIVIDUAL PROGRAMMING PROJECT

The following assignment uses object-oriented programming and visual programming to write a software tool. You will need to work on this assignment as an individual. Turn in the assignment before class on Nov. 26, 1997. Everyone in the class will have a chance to evaluate your project. You will be expected to turn in the completed program along with complete external documentation at that time. You will also be asked to explain and demonstrate your program. An important part of your grade will to be creative and make full use of the visual aspects of windows and graphics.

BE SURE TO FOLLOW THE PROGRAMMING STANDARDS DISCUSSED IN CLASS ***MODULARIZE***

OPTION A: Write a program which 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.

OPTION B: 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.

OPTION C: Write a program which plays the Tic-Tac-Toe 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 GAME

The 3 x 3 grid will be displayed before and after each move. In a one-player game, the player will compete against the computer and will move first. The standard rules of Tic-Tac-Toe will be followed, i.e. a player wins when he/she places three X's or 3 O's in a row, column or diagonal.

 

OPTION D: Write a program that manages a geneology database.

 

OPTION E: Write a program that includes a calendar, scheduler and alarm.

 

OPTION F: Write a program to play the MasterMind game.

 

OPTION G: Suggest a project of your own subject to the approval of the class.