Data Structures Final Project

profileThehonest
 (Not rated)
 (Not rated)
Chat

Data Structures Final Project

Create an OOP program.

class GhostGame.

The game of GHOST is a Word game

 

Example of Play

Player 1 picks a letter.

Player 2 picks a 2nd letter, which must be a 2nd letter of an actual word, but not yet a full word.

Next player picks the 3rd letter, which must be a 3rd letter of an actual word, but not yet a full word.

To lose, you are forced to pick a letter the will spell a complete word.

To stay in the game or win, you add a letter that will not yet spell a complete word.

The letter sequence MUST lead to the spelling of an actual word.

2 to 4 player (no computer player) – Prompt the user for number of players. Validate.

 

Requirements:

Find an English word list online (minimum of 100,000 words) and upload the list into an appropriate data structure.

During the play, have the user letter sequence verified; it must lead to an actual word.  If not, then inform the player to try again.

Keep track of each player’s number of incorrect letter selections.

 

Who wins/looses?

A Player who is forced to spell a complete word is last place

Other players are ranked by the number of non word letters they tried... the fewer the better.

Use the appropriate data structures to create this game.

Hint: A Trie Tree and others....

Use lower case letters for words.

To play the game

Int main() {

    GhostGame G;

    G.Play();

}

 

What to hand in

A description of your program and its features.

A description of your program's command-line syntax.

A description of the main data structures your program uses.

A discussion of the current status of your program, what works and what doesn't, etc.

Your program's source code.

Your plan that you used to write your code (See below)

Screen prints of the successful execution of your code.

Constraints

This project will require you to implement one or more data structures.  Either use the STL or write your own classes, it is up to you.

Grading Criteria

Successful compilation. If your program doesn't compile, I can't grade it.

Correctness. Your program needs to do the job it is intended to do.

Design. I will look for well-considered choices of data structures, classes, and method signatures.

Style. I want to see good indentation, descriptive variable and function names, well-placed comments, consistent loop structure, and so on. Ideally, your code will be a pleasure to read. (This assumes a reader who enjoys reading code, but you're in luck, since I am such a reader.)

Documentation. Your description of your project and the comments in your source code are important parts of your project. I want to be able to understand your project fairly well before diving into the code.

Performance. I will not run precise time tests, but I will frown on programs that take 10 minutes to process a single word ladder or pair of actors.

Advice

Plan your program on paper. Do not start your work at the computer. This forethought can save you a lot of time.

Design classes and methods that will make the main program easy to write. You want your methods to provide methods to the rest of your code, and good design of those methods can make the difference between code that is very straight-forward to write and code that acts like a tar pit. Think carefully about your classes. It's worth the time.

Make an incremental development plan. That is, make a list of things you will make your program do, in the order in which you will write the code. Each stage of your development should be a small step that can be compiled and tested (and backed up!) before you move on to the next step.

Ask questions. I will be very happy to help you when you're stuck. Don't wait. Time is shorter then you think !

 

 

 

    • 8 years ago
    A+ Work
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      structures.zip