Design a java program that simulates a slot machine

Assignment Help JAVA Programming
Reference no: EM13713928

Question -A slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button).

The slot machine then displays a set of random images. If two or more of the images match, the user wins an amount of money, which the slot machine dispenses back to the user. Design a java program that simulates a slot machine.

When the program runs, it should do the following: Ask the user to enter the amount of money he or she wants to insert into the slot machine.

- Instead of displaying images, the program will randomly select a word from the following list: Cherries, Oranges, Plums, Bars, and Bells. The program will select and display a word from this list three times.

- If none of the randomly selected words match, the program will inform the user that he or she has won $0. If two of the words match, the program will inform the user that he or she has won two times the amount entered. If three of the words match, the program will inform the user that he or she has won three times the amount entered.

- The program will ask whether the user wants to play again. If so, these steps are repeated. If not, the program displays the total amount of money entered into the slot machine and the total amount won.

Can you give the answer ASAP and there is no word limit?

Reference no: EM13713928

Questions Cloud

Find the second plain text : Find the second plain text x2 - Can somebody provide the answer for given question with example?
Explain the percent abundance of the heaviest isotope : A hypothetical element has an atomic weight of 48.68 amu. It consists of three isotopes having masses of 47.00 amu, 48.00 amu, and 49.00 amu. The lightest-weight isotope has a natural abundance of 10.0%. What is the percent abundance of the heavie..
How does the marketer''s challenges : Services Marketing thinks of an example of a service in each of the following four categories in Lovelock's classification and answers. How does the marketer's challenges.
Proposal to ensure the application of the concepts : Prepare the Outline of the Final Project based on your approved Project Proposal submitted in Week 4. The Outline must be structured on the Proposal to ensure the application of the concepts and techniques learnt in this module.
Design a java program that simulates a slot machine : Instead of displaying images, the program will randomly select a word from the following list: Cherries, Oranges, Plums, Bars, and Bells. The program will select and display a word from this list three times.
A current passed through a sn(no3)2 solution : A current of 5.63 A is passed through a Sn(NO3)2 solution. How long (in hours) would this current have to be applied to plate out 8.20 g of tin
What role do personality : What role do personality, national culture, and organizational culture play in influencing an individual's ethics
Generate a main program which initializes : Generate a main program which initializes your data array to be sorted - be careful with your array index numbers. You can use a random number generator to generate entries for the array.
Determine the volume of the container after the h2 : At a fixed temperature, equal moles of H2 (g) and O2 (g) are mixed in a constant pressure container (the volume of the container changes in order to keep the pressure at a constant value). The H2 (g) and O2 (g) are allowed to react, producing H2O ..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write java program to receive input and displayed interest

Write a Java program that receive some input and displayed the interest. Format the number into 2 decimal places. Using loop is an advantage.

  Implement a recursive method that evaluates the gcd

Implement a recursive method that evaluates the GCD of the given numbers - Use the above fact to create a recursive method in Java that computes and returns the gcd of two positive integers. Comment the code.

  Prepare a simple windows calculator in java it must have a

create a simple windows calculator in java. it should have a labeled text field for the user to provide input as well

  Write a script that prints out the full pathnames

Write a script that prints out the full pathnames of your files that are over a specified size.  The size should beread as a command line argument to the script.

  Displays the stored array values on the screen

Displays the stored array values on the screen using WriteInt - Prompts the user for integer input a dozen times

  Write down a java gui application index2java based on the

write a java gui application index2.java based on the program in step 1 that inputs several lines of text and uses

  Write a mathematical recursive definition

Write a mathematical, recursive definition of p(n) - Prove that your answer to Part a is correct by using mathematical induction.

  Create an application for an animal-fur trimming service

create an application for an animal-fur trimming service. the business is open 15 weeks of the year from april through

  Class named stock to model a stock

Write a class named Stock to model a stock. The properties and methods of the class are shown in Figure 6.22. The metho changePercent computes the percentage of the change in the current vs. the previous closing price.

  Tic-tac-toe game assignment

Assignment 1(Java): Tic-Tac-Toe Game (Assignment 1 is attached),  Use the concepts and scenario from Assignment 1 and continue with the tic-tac-toe game design and development.  Section 1: Java Program File, The following method, numPaths, is suppos..

  Write a java program that asks the user for his/her gender

According to researchers at Stanford Medical School, the ideal weight for a woman is found by multiplying her height in inches by 3.5 and subtracting 108.

  Write down the business needs for a computer program and

write the business requirements for a computer program and identify which entities are to be modeled using object

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd