Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ ONLY. HELP! Question 1 (40 points) Description You are going to make a spin the wheel themed prize game! We're going to build the

C++ ONLY. HELP!

image text in transcribed

image text in transcribed

image text in transcribed

Question 1 (40 points) Description You are going to make a spin the wheel themed prize game! We're going to build the game over the next few problems. Please follow the instructions of each question Instructions . In a header file,create a class called "PrizeWheel" and corresponding .cpp file The class should contain the following data: A vector of ints that will represent the prize money o An int result which will represent what the wheel landed on during the spin. Create the following functions SetupPrizes - Should setup prizes in the vector. Setup the vector with the following data: 10,000, 1,000, 500, 300, 100, 50 Lose, Lose, Lose, Lose (arrange in random order) There are 4 loss cases in which 0 money is won. These are similar to the bankrupt cases in Wheel of Fortune Default Constructor - Should setup prize data with SetupPrizes function Spin Public function. Will spin the wheel so to speak. This is responsible for generating a random integer and storing it into result. Call GetPrize (returns int of prize money won) from this function and return an int that will return the prize money. The design here is that spin will call GetPrize to get the money won and then return the money value from Spin. . GetPrize Private function. Will be called from Spin. Will look at "result" and access the vector to determine what prize was won. This function will return the matching element value from the vector returning the prize money won back to Spin

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_2

Step: 3

blur-text-image_3

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

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions