Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Gambling Greg Outcome: Student will demonstrate the ability to create and use structs Student will demonstrate the ability to create and use menus Student will

Gambling Greg Outcome:

Student will demonstrate the ability to create and use structs

Student will demonstrate the ability to create and use menus

Student will demonstrate the ability to create and use an array of structs

Student will demonstrate the ability to generate and use random numbers

Program Specifications:

You are to assume that gambling Greg is going to the Dog Racing Track. Greg loves to bet on the puppies. In each race Greg will place a wager and pick a dog. The dog information will be stored in a structure name DOG as follows:

Name, amount to payout if Greg wins, and the odds of this dog winning the race.

Among other things or menus, the program will have the following menu:

[G]amble [

B]anking

[R]esults of each race that Greg wagered

[L]eave the dog track

If Greg selects [G] the program will ask Greg for his wager and allow Greg to pick a dog. The program will then run the races. The result will be shown to Greg. The results of the race will be stored for future use.

If Greg selects [B] the program will ask Greg if he wishes to withdraw funds or deposit funds from his bank account.

If Greg selects [R] the program will show Greg the results of all previous races.

If Greg selects [L] the program will end. The dogs: You will create 9 different dogs.

Dog Name

Payout

Odds of Winning

You name the dogs

2 to 1

40%

5 to 1

10%

10 to 1

8%

15 to 1

6%

50 to 1

1%

20 to 1

4%

10 to 1

8%

5 to 1

10%

3 to 1

13%

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

Students also viewed these Databases questions

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

* What is the importance of soil testing in civil engineering?

Answered: 1 week ago

Question

Explain the concept of shear force and bending moment in beams.

Answered: 1 week ago