Pearson eText for Starting out with Visual C# -- Instant Access (Pearson+)
Pearson eText for Starting out with Visual C# -- Instant Access (Pearson+)
5th Edition
ISBN: 9780137502783
Author: Tony Gaddis
Publisher: PEARSON+
Question
Book Icon
Chapter 9, Problem 3PP
Program Plan Intro

SLOT MACHINE SIMULATION

Program plan:

  • Design the page.
    • Add title to the form as “Slot Machine”.
    • Place three picture box controls in the form.
    • Place a label control and edit its text property as “Amount Inserted: $”.
    • Place two buttons and edit their text property as “Spin” and “Exit” respectively.
  • In the code window, write the code to:
    • If amount is inserted then execute the form.

Form design:

  • Open Microsoft Visual Studio 2010.
  • Select C# and click Windows Forms Application.
  • Name the project as Slot_Machine.
  • Store the file in D:\Clearly C#\ Slot_Machine.
  • The crated project displayed with a form with the name of Form1.
  • Select the Form1 and add the necessary components.
  • In property window, change the Form name and add changes for Form elements properties.
  • Click the File menu->Save All.

View of the form design in the IDE:

Pearson eText for Starting out with Visual C# -- Instant Access (Pearson+), Chapter 9, Problem 3PP

The form control properties in the properties window are as follows:

ObjectPropertySetting
Form1TextSlot Machine
pictureBox1ImageLocation of the image
pictureBox2ImageLocation of the image
pictureBox3ImageLocation of the image
label1TextAmount inserted: $
button1TextSpin
button2TextExit
  • Add three picture box control in the form.
  • Add a label control to display the amount inserted.
  • Add the button control spin to execute the slot machine.
  • Add the button control exit to stop the execution the program.

Blurred answer
Students have asked these similar questions
Computer programs can be very complex, containing thousands (or millions) of lines of code and performing millions of operations per second. Given this, how can we possibly know that a particular computer program's results are correct? Do some research on this topic then think carefully about your response. Also, explain how YOU would approach testing a large problem. Your answer must be thoughtful and give some insight into why you believe your steps would be helpful when testing a large program.
Could you fix this? My marker has commented, What's missing? The input list is the link below.  https://gmierzwinski.github.io/bishops/cs321/resources/CS321_Assignment_1_Input.txt     result.put(true, dishwasherSum);        result.put(false, sinkSum);        return result;    }}
PLEG136: Week 5 Portofolio Project Motion to Compel

Chapter 9 Solutions

Pearson eText for Starting out with Visual C# -- Instant Access (Pearson+)

Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr