C# Slot Machine;ITS 148: Visual Studio.NET I Semester Programming Exercise 10: Play the Slot Machine.

C# Slot Machine;ITS 148: Visual Studio.NET I Semester Programming Exercise 10: Play the Slot Machine.

Problem Statement: Design a Visual C# application form that implements a slot machine using enumerations, switch statements, and a random number generator.
Slot machines are practically found in all legal gambling establishments such casinos in Las Vegas. A typical slot machine has a single level that when pulled will

randomly generate and display three pictures. The gambler who places a bet will win if two or three of the same pictures appear. A grand prize is given if three lucky

13 pictures are generated.
Assume up front that the gambler must start with $100 from which he or she may place a bet of either $1, $5, or $10. A win or loss is described below: a. Wins double

the bet if two of the same pictures appear. b. Wins triple the bet if three of the same pictures appear except for the lucky 13 picture. c. Wins $100 if three lucky 13

pictures appear. d. Loses the bet if all three pictures are different.
The application should 1. Use three picture boxes 2. Use a label for the starting amount 3. Use a Combo Box for the bet 4. Use a hidden label that displays a message

after pulling the lever 5. Implement two buttons (pull level and cash out) 6. Use the image list control to capture the pictures that are in the FruitSymbols folder.

7. Define global variable: balance indicating the gambler’s starting amount. 8. Define a global enumeration type that has predefined constants identified by names.

Use the default assigned values given to listed enumerators which should match the generated random numbers representing the images. Create variable(s) of the

enumerated type to hold a constant representing one of the generated images. Use these variable(s) in the application. The example below is the enumeration type. enum

slotResult { banana, cherry, grape, pear, strawberry, watermellon, lucky13 }
9. Generate three random pictures (fruits or lucky 13) using a random number generator. The .Net Framework provide a class named Random that you can use in C# to

generate random numbers. You will need to create an object of the Random class and use its method Next to generate a random integer.
// Example Random generate = new Random(); int val = generate.Next(20); // Will generate a random integer from 0 to 19
10. Use a switch statement in the program.
Event Procedures: There are three events associated with form load and the two buttons.
1. FormSlotMachine – On form load the starting amount is set to $100 and displayed in the labelBalance.
2. buttonPullLevel – This button should validate that a bet was placed and to determine whether the gambler has enough funds to cover the bet. Assuming the bet is

possible, randomly generate three pictures and display them in the PictureBoxes, update the balance for win or loss, and display an appropriate message for the amount

won or lost.
3. buttonCashOut – This button should end the program and close the form. Effectively, the gambler has cash out his balance.
1. Start a new project using the Visual Studio C# template and Windows Forms Application inside your assignment folder on your flash drive and name it SPE10.
2. Rename the default form name from Form1 to FormSlotMachine by renaming the Form1.cs file to FormSlotMachine.cs through the Solution Explorer.
3. Create the FormSlotMachine form design in Visual C# that closely resembles the GUI which appears on the last page. In addition, implement the controls as shown on

the last page and a. Set the form so that the cancel button will be the Exit button. b. Set the access key P for Pull Lever button. c. Set the access key C for the

Cash Out button. There is no Exit button.
4. Change the label “Programmer: name” by replacing name with your real name.
5. Write the Visual C# code for the following events: a. The form load b. The Pull Lever button c. The Cash Out button
6. Run this programming exercise. Test and verify that all functionality behaves according to the specifications in this exercise.
7. Laulima Delivery: a. Delete the “obj” folder b. Right click on your main project folder SPE10 and select “Send to”->”compressed”. This will make a “SPE10.zip” file.

c. Upload your zipped file.
8. Screenshot of Template Form: Below are four images of the “FormSlotMachine” form containing the finished product.
Create a form as shown below Gambler has placed $10 bet and lost $10
Gambler has placed $5 bet and won $10 Validating the Bet

Order from us and get better grades. We are the service you have been looking for.