Program in java that will simulate a basic game of craps

Assignment Help Other Subject
Reference no: EM13254554

Scenario:

The Pass Line is the main bet in craps. The Pass Line bet starts a new round. Place your bet (in $5 increments). The shooter then rolls a pair of dice. The first roll of a round is called the Come Out roll, and here's what happens depending on what is rolled:

7 or 11, you win. If you win the dealer will pay you the amount of your bet. (If you bet a $5 chip, they'll give you another $5 chip.) The shooter then rolls another Come Out roll.

2, 3, or 12, you lose. If you lose, then they'll take your chip away. The shooter then rolls another Come Out roll. 4,5,6,8,9,10, Enter the Point round.

If you didn't win or lose right away then you go to the Point round, and the dealer marks the number that was rolled (4,5,6,8,9,or 10). That number is called the Point. You win if the shooter rolls the Point again, and you lose if a 7 is rolled first. Rolling a 7 before rolling the point again is called sevening out.

QUESTION

Write a program in java that will simulate a basic game of Craps. Ask the user for their starting money amount. Begin the game by asking for the bet ($5 increments only). The computer will simulate rolling the dice by using the random number generator (1-6). Show the values of each die. Determine if you win, lose or go to the Point round. Continue to roll the dice until you win or lose. Add or subtract the bet from the user’s money. If the user has at least $5, ask if they would like to play again. The program will end when the user wants to quit or does not have enough money left.

Reference no: EM13254554

Questions Cloud

Define what are the salt ions in the elution buffer good for : Describe a common buffer system and elution method in ion exchange chromatography. What are the salt ions in the elution buffer good for
Find the electric susceptibility of cherry-flavored jello : Find (a) the electric susceptibility of cherry-flavored Jello, (b) the permittivity of cherry-flavored Jello, and (c) the electric flux density in cherry-flavored Jello for an applied electricfield of 1 kV/m. Assume cherry-flavored Jello is line..
How many constraints will be in a problem : A mass merchandiser has four distribution centers to supply 201 retail stores in the Indiana/Ohio area. The distribution centers can supply any store. How many constraints will be in a problem to determine which distribution center supplies which ..
Explain the reaction reaches equilibrium : If the initial concentration of HD(g) is 8.433 mol/L, calculate the % of HD(g) left over after the reaction reaches equilibrium according to the balanced equation. The value of Kc at -173.0 °C is 0.52. The initial concentration of the reaction pro..
Program in java that will simulate a basic game of craps : Write a program in java that will simulate a basic game of Craps. Ask the user for their starting money amount. Begin the game by asking for the bet ($5 increments only). The computer will simulate rolling the dice by using the random number generato..
What is the error on each day : Prepare a three-peroid moving average forcast for the data. What is the error on each day?
Find the magnitude of the heavier blocks acceleration : Two blocks of weights 77.0 and 114.0 N are connected by as massless string and slide down an inclined plane making an angle of 45.0 deg, find the magnitude of the heavier block's acceleration
Define the heat of vaporization of water : The heat of vaporization of water is 40.66 kJ/mol. Assuming sweat is 100% water, how much heat is removed from your body through the evaporation of 1.86 g of sweat
Competitors for a health care organization : Formulate at least three questions that are well-suited to initiate strategic thinking regarding service area and competitors for a health care organization. Why do you feel that these questions are so important to pose?

Reviews

Write a Review

Other Subject Questions & Answers

  People being placed at the heart of organizing

What happens to ‘people being placed at the heart of organizing’ when organizations become virtual? How does the trend toward wired organizations fit with the Relational Leadership model espoused by Kouzes and Posner,

  Image and professionalism of the private security industry

Discussing the public relations image and professionalism of the private security industry. What are some examples from the article concerning the importance of private security industry members having the same level of professionalism as public law ..

  Forensic psychology topic-false memories

Drafting a Quantitative Research Plan in a forensic psychology related topic. The draft must comprise the following:

  Difference between learning-memory-performance

Acquisition, retention and transfer are processes used in learning new information, retrieving previously stored knowledge

  Administering the bsi

What are the diversity considerations related to administering the BSI for one who is Hispanic and complains of often being angry and lacking energy and how could the professional address this issue?

  Jungle to raise awareness to the plight of factory workers

Sinclair wanted The Jungle to raise awareness to the plight of factory workers as much as he wanted it to highlight unsanitary conditions.

  Behaviors of social dominance nfluence evolutionary process

How do different behaviors of social dominance and courtship display influence evolutionary process? What other behaviors might have the influence on evolution?

  Thrive-survive and reproduce-favorable traits

Favorable traits are traits that promote an organism's success in a particular environment. Organisms with favorable traits are more likely to thrive, survive, and reproduce than organisms without favorable traits.

  Create arguments for and against the legislation

Biotech medicines---proteins made by modifying the DNA of bacteria, yeast or mammal cells and infused into sick patients---are the fastest growing category of health spending. Create arguments for and against the legislation.

  What trend developed in the resolution of these disputes

Name at least three key moments in the early 1800s when federal authority clashed with state authority. What trend developed in the resolution of these disputes?

  Kinds of emergency services

Law enforcement and emergency responders were not prepared for the magnitude of the damage that resulted. State response was hindered because the National Guard equipment routinely used, including tents and trailers, had been deployed to Iraq.

  Which statements best characterizes whale songs

Two groups of whales, the Humpback Whale and the subspecies of Blue Whale found in the Indian Ocean, are known to produce a series of repetitious sounds at varying frequencies. This is known as whale song. Male humpback whales perform these vocaliz..

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