is 100 gouti long (a gouti is a unit of measurement used by animals). Each animal is allowe move in each round. The following table, shows the type of move possible for each animal the probabilities of those moves occurring. Animal Туре of Move Sleep Big jump Big slip Small jump Small slip Probability of Move Occurring 20% 20% 10% 30% 20% What Happens When Move Takes Place No move 9 gouti to the right | 12 gouti to the left 1 gouti to the right |2 gouti to the left Manicou

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Greetings, may I get some assistance right away? I need help with this question, it must be written in C++

A manicou (opossum) and a morocoy (local tortoise, looks like a turtle) started a race. The track
is 100 gouti long (a gouti is a unit of measurement used by animals). Each animal is allowed one
move in each round. The following table, shows the type of move possible for each animal and
the probabilities of those moves occurring.
Animal
Probability of
Move Occurring
20%
Туре of
Move
Sleep
Big jump
Big slip
Small jump
Small slip
What Happens When
Move Takes Place
No move
9 gouti to the right
12 gouti to the left
1 gouti to the right
2 gouti to the left
Manicou
20%
10%
30%
20%
Morocoy
3 gouti to the right
1 gouti to the right
6 gouti to the left
Fast walk
50%
Slow walk
Slip
20%
30%
Using the information in the table, write a program to simulate the race between the manicou and
the morrocoy. The type of move for each animal is randomly chosen in each round based on the
probabilities given.
The first animal to reach the finish line (100 gouti to the right) wins the race. Note that "“left" in
the table refers to going back in the opposite direction of the finish line; "right" refers to going in
the direction of the finish line. Assuming that the starting point is at 0, do not allow an animal to
go to the left of 0.
At the end of the race, you should display which animal won the race, the amount of rounds it
took to win the race, and the distance reached by the other animal.
Transcribed Image Text:A manicou (opossum) and a morocoy (local tortoise, looks like a turtle) started a race. The track is 100 gouti long (a gouti is a unit of measurement used by animals). Each animal is allowed one move in each round. The following table, shows the type of move possible for each animal and the probabilities of those moves occurring. Animal Probability of Move Occurring 20% Туре of Move Sleep Big jump Big slip Small jump Small slip What Happens When Move Takes Place No move 9 gouti to the right 12 gouti to the left 1 gouti to the right 2 gouti to the left Manicou 20% 10% 30% 20% Morocoy 3 gouti to the right 1 gouti to the right 6 gouti to the left Fast walk 50% Slow walk Slip 20% 30% Using the information in the table, write a program to simulate the race between the manicou and the morrocoy. The type of move for each animal is randomly chosen in each round based on the probabilities given. The first animal to reach the finish line (100 gouti to the right) wins the race. Note that "“left" in the table refers to going back in the opposite direction of the finish line; "right" refers to going in the direction of the finish line. Assuming that the starting point is at 0, do not allow an animal to go to the left of 0. At the end of the race, you should display which animal won the race, the amount of rounds it took to win the race, and the distance reached by the other animal.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY