G
g_sharad
Hi Everyone I have a object oriented C++ assignment which is due this
week and I have no idea as to how start it.................
This program prints a motion verb ( fly, run, swim, crawl, walk, or
roll ), waits for a second,
then prints the name of an entity and repeats the verb (for example:
fly ..1s.. pigeon fly!.. ).
The player has ½ second to type 'y' for yes or 'n' for no. (case
insensitive)
- If the answer is correct, the player scores, if incorrect, or if
there was no answer within the ½ second, the
player looses a point. When correct, all the motions the entity can
perform are printed.
- When wrong, Ka..BOOM! is printed instead.
The default number of questions per player is 20, but the number can
be changed by passing a different
number on the command line when starting the program.
At the end of the run the player's score (and the score of previous
players if there were any) is printed, the
question: "Another player (Y/N): " is asked. The game exits if 'n' is
typed.
The output should look something like this:-
Player 1 starting.
You must answer with the letter 'y' for YES, or 'n' for NO.
Press [Enter] when ready to start:
1 - fly pigeon fly!.. y
- I walk - I fly
2 - swim Wheelbarrow swim.. n
- I roll
3 - crawl ball crawl!..
Ka...BOOM!
4 - fly plane fly!.. y
- I roll - I fly.
5 - run boat run!.. n
- I roll.
6 - walk engine walk!..
Ka..BOOM!
7 - roll stone roll!.. y
- I roll.
.. . .
16- crawl time crawl!.. y
- I crawl - I fly.
17- swim goose swim!.. n
Ka..BOOM!
18- run lizard run!.. y
- I run - I crawl.
19- run nose run.. y
- I run
20- fly goose fly!.. y
- fly - I walk - I run - I swim.
Player 1 *** score: 16 ***
Well done! Start another player (Y or N)? y
Player 2 starting
You must answer with the letter 'y' for YES, or 'n' for NO.
Press [Enter] when ready to start:
1 - crawl giraffe crawl!.. y
Ka..BOOM!
week and I have no idea as to how start it.................
This program prints a motion verb ( fly, run, swim, crawl, walk, or
roll ), waits for a second,
then prints the name of an entity and repeats the verb (for example:
fly ..1s.. pigeon fly!.. ).
The player has ½ second to type 'y' for yes or 'n' for no. (case
insensitive)
- If the answer is correct, the player scores, if incorrect, or if
there was no answer within the ½ second, the
player looses a point. When correct, all the motions the entity can
perform are printed.
- When wrong, Ka..BOOM! is printed instead.
The default number of questions per player is 20, but the number can
be changed by passing a different
number on the command line when starting the program.
At the end of the run the player's score (and the score of previous
players if there were any) is printed, the
question: "Another player (Y/N): " is asked. The game exits if 'n' is
typed.
The output should look something like this:-
Player 1 starting.
You must answer with the letter 'y' for YES, or 'n' for NO.
Press [Enter] when ready to start:
1 - fly pigeon fly!.. y
- I walk - I fly
2 - swim Wheelbarrow swim.. n
- I roll
3 - crawl ball crawl!..
Ka...BOOM!
4 - fly plane fly!.. y
- I roll - I fly.
5 - run boat run!.. n
- I roll.
6 - walk engine walk!..
Ka..BOOM!
7 - roll stone roll!.. y
- I roll.
.. . .
16- crawl time crawl!.. y
- I crawl - I fly.
17- swim goose swim!.. n
Ka..BOOM!
18- run lizard run!.. y
- I run - I crawl.
19- run nose run.. y
- I run
20- fly goose fly!.. y
- fly - I walk - I run - I swim.
Player 1 *** score: 16 ***
Well done! Start another player (Y or N)? y
Player 2 starting
You must answer with the letter 'y' for YES, or 'n' for NO.
Press [Enter] when ready to start:
1 - crawl giraffe crawl!.. y
Ka..BOOM!