Neel Help

B

babarbuttgrt

Need help please send code for given task....

The task is developing a mini dice rolling game using data structures and C++ as programming language. Game should meet the following requirements.

Requirements:

Game should be build with the help of stack, link list, array and queue data structures.

Game will prompt user to enter the number of players in game.

Input the name of player and take 5 turns by rolling dice. Outcome of dice should be added into total scores of player.

Save each player's record into stack.

Stack should be implemented using link list.

Finally pop all player name and scores from stack and print them as summery.

Use queue data structure as dice, having six values from 1-6. Queue should be implemented with the help of array (circular array).

To randomly select the value from the queue, we will rotate a loop up to a random value(obtained with the help of built in method rand()
 
W

Wouter van Ooijen

(e-mail address removed) schreef op 20-May-14 11:39 AM:
Need help please send code for given task....

Could do, but I would like to CC your teacher ;)

Wouter
 
O

Osmium

Need help please send code for given task....

The task is developing a mini dice rolling game using data structures and
C++ as programming language. Game should meet the following requirements.

Requirements:

Game should be build with the help of stack, link list, array and queue
data structures.

Game will prompt user to enter the number of players in game.

Input the name of player and take 5 turns by rolling dice. Outcome of dice
should be added into total scores of player.

Save each player's record into stack.

Stack should be implemented using link list.

Finally pop all player name and scores from stack and print them as
summery.

Use queue data structure as dice, having six values from 1-6. Queue should
be implemented with the help of array (circular array).

To randomly select the value from the queue, we will rotate a loop up to a
random value(obtained with the help of built in method rand()

The problem doesn't sound to me like it makes a lot of sense. Most
particularly the ornate way in which the rolling of the dice is handled.
Also it is not clear what parts of the STL are used. Should you use the STL
linked list to make a stack? Or do you write your own linked list?

Setting that aside, it seems that a fundamental of the exercise is a stack
that contains a player name and an aggregate score. A linked list wouldn't
be my first choice to make a stack - but there it is, right in the
specification. So the first task for you is to make a stack that will
contain a user name and an aggregate score. Aggregates of that kind are
called structures, or struct for short. If you can't do that part, and post
it, I see little point in continuing the course. Why not drop out of the
course so you can concentrate on your other studies? There is no way you
can pass a final test, is there?

If you don't post *some* code you will only get scorn, derision, and even
worse - misleading answers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top