subject

Play10 Lottery Game: That simulates a lottery game that generates a random integer between 1 and 10, and then allows the user to purchase lottery tickets for $2.00 a piece to try and win money if the purchased tickets’ integer match the winning integer. The odds of winning are 1:9 (winning outcomes to losing outcomes). The probability of winning is expressed as 1/10 (1 winner in 10 outcomes), so a $2.00 ticket that matches the winning integer will receive a fair payout of $20.00. Create a Java application in NetBeans called "Lab05" that asks the user how many tickets will be purchased, confirms the credit card charges for the tickets, and then asks if the user wants to have the computer generate the guesses between 1 and 10. If so, the program should use the following formula to generate the random guesses and the random winning integer: random Integer = min + (int) (Math. random() * ((max - min) + 1)). In this case, the min is 1, and the max is 10. Otherwise, the program asks the user to enter the guesses. Once done, compare the guesses to the winning integer, and accumulate the total winnings and losings and report the tickets that are winners. The ticket price must be declared as a constant, set to $2.00, in your program. You can accumulate this ticket information to a String output variable inside a for loop, and then print the output variable after completing the for loop. Report the total winnings, the remaining balance after subtracting credit card charges, and the amount that you can deduct from your taxes. The allowable tax deduction is the total amount of your losses up to the amount of your winnings (i. e. the minimum of your total winnings and total losses). Study the sample runs below, and note the checking of the inputted data for errors.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 12:00, tipbri6380
An npn transistor is correctly biased and turned on if the a. base is negative. b. collector is negative. c. collector is positive with respect to the emitter and negative with respect to the base. d. collector is the most positive lead followed by the base.
Answers: 1
image
Computers and Technology, 24.06.2019 12:40, kanga06
Match the feature to the network architecture. expensive to set up useful for a small organization easy to track files has a central server inexpensive to set up difficult to track files useful for a large organization does not have a central server client- server network peer-to-peer network
Answers: 3
image
Computers and Technology, 24.06.2019 16:00, miner12924owhu4d
5.a fishing rod is formed from a composite material of 0.5 kg of glass fibers embedded in a matrix of 0.5 kg of epoxy resin. the glass fibers are assumed to be long, continuous and unidirectional. to achieve a greater stiffness it is proposed to use a different composite that is comprised of long continuous carbon fibers that will be embedded in a matrix of 0.5 kg of epoxy resin. if the modulus of elasticity of the carbon fiber composite is 10% greater than the elastic modulus of the glass fiber composite, estimate the mass of carbon fibers that will be used to make the carbon fiber composite. assume the applied tensile stress is parallel to the direction of the long axis of the fibers. the epoxy resin, glass fiber, and carbon fiber have an elastic modulus of 5, 86, and 350 gpa respectively and a density of 1100, 2500, and 1800 respectively.
Answers: 3
image
Computers and Technology, 24.06.2019 18:20, seema12
7. design a circuit with three inputs (x, y, and z) representing the bits in a binary number, and three outputs (a, b, and c) also representing bits in a binary number. when the input is 1, 2, or 3, the binary output should be one lesser than the input. when the input is 4, 5, or 6, the binary output should be one greater than the input. when the input is 0, the output is 0, and when the input is 7, the output is 7. show your truth table, all computations for simplification, and the final circuit.
Answers: 2
You know the right answer?
Play10 Lottery Game: That simulates a lottery game that generates a random integer between 1 and 10,...

Questions in other subjects: