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 a bag class with a generic type

Write a Bag class with a generic type. Write a class such as item that has a name and price - Add objects of item to the bag and find the average and the total of the price of all items in the bag.

  Create a non-gui based java application

Create a non-GUI based Java application that calculates weekly pay for an employee. The application should display text that requests the user input the name of the employee.

  Write an application that uses string method region

Write an application that uses String method region - Matches to compare two strings input by the user. The application should input the number of characters to be compared and the starting index of the comparison.

  Evaluate the rtas resource requirements

Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements.

  Complete the twins() method

Complete the twins() method, which takes an integer argument n and prints all the sets of twin primes that are less than n, one pair per line

  Write java application to input three integers from user

Write Java application that inputs three integers from user and displays sum, average, product, smallest, and largest of the numbers.

  Write complete java program assuming that the variables gpa

Write a complete java program assuming that the variables gpa, studentName and deanList have been declared, you should read in the gpa and studentName from keyboard.

  Design a class that can be used to hold information

Implement and design a class that can be used to hold information about a musical note - Prepare a complete java program the default constructor should set a note to a middle C quarter note.

  Allows the user to enter a temperature and whether

Write a program that allows the user to enter a temperature and whether the temperature is stated in Celsius or Fahrenheit...or whethe

  Elliptic curve encryption

write a program to implement Elliptic Curve encryption/decryption and program will read parameters, plaintext and ciphertextfrom a file named "input.txt" (under the same directory).

  Report the last letter of each word in the string

Write a sequence of Java statements that report the last letter of each word in the string.

  Write a program that creates an enumeration representing

Sherri rolls a 3 and decides to continue. She then chooses to roll two more times (6, 1). Because she rolled a 1, Sherri's turn ends and she earns 0 points.

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