Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please include //.cpp file //.header file //.implementation file The Great Race Simulation Recreate the great race between the tortoise and the hare using pointers. Using

image text in transcribed

Please include

//.cpp file

//.header file

//.implementation file

The Great Race Simulation Recreate the great race between the tortoise and the hare using pointers. Using a race course of size 70 where the race course is an array and the tortoise location is represented by a "T" and the hare is an "H" simulate the race one minute at a time by advancing the tortoise and hare using pointers. The two racers move in different ways based on random selection of different types of moves. Tortoise moves: 50% 3 steps forward 30% 1 step forward 20% 6 steps back Hare moves: 20% sleep (no move) 20% 9 hops forward 10% 12 hops back 30% 1 hop forward 20% 2 hops back The racers locations each minute of the race will be captured and recorded and should look something like this: Start 1 1 H Finish -1 -1 1 -H----T OUCH!!!-- In the event (except at the start) if the tortoise and hare end up on the same spot you the race course should display the word OUCH!!! First racer to cross the finish line is the winner and when that happens your program should say so

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago