Computers and Technology

Write a program that simulates and scores a game of bowling. As background information, here is an explanation of terminology and scoring. Your game will need to keep score for at least one player, multiple players are allowed. 10 frames for each player, and if the final frame is a strike or spare they roll the 11th frame.
(Instructions)
1. No BlueJ, use Netbeans, Eclipse or another approved IDE.
2. Create a class named Bowling that will manage the gamemy public static void main was in my bowling, I set things up in constructor then called play() and that method handled the 10 frames, including calling methods to do things such as print the formatted output. I also used a Frame class. You can use more than one .java file
3. Create a Bowling class such that when the main method of the Driver class is run, HERE IS THE FORMATTED OUTPUT. It is a screen capture of me running my program five times. Note: match the output format exactly! You only need to run it once, match one of the lineswith your random scores that come up, not mine.
4. Your bowling game should knock down pins randomly, use a random number generatorbut just like in real bowling (no I do not bowl) higher numbers should be weighted more so you roll more 7s than 2s for instance. 0, 1, 2, 3, 4, 5 should all have a weight of 1. 6 should have a weight of 2. 7 and 10 should have a weight of 3, 8 and 9 should have a weight of 4 for first roll only. Second roll should be weighted all equal but you should only knock down how many of the 10 pins are left after the first roll. Weights make the game more fun to play.
5. Any spare or strike (anytime you get all 10 pins down on roll1 or roll2) you should do the scoring properly adding to the previous frame.
6. 10th frame should be done properly. Handling spares and strikes in the 10th frame properly.
7. You should set your game up to hold on to all frames first and second ball scores and each frame scoreit will make it easier in the long run.
8. Feel free to add two player games. Put in some skill by a player instead of just randomness. Still needs to be able to do random numbers also.
9. import java. util. random and look up the Random class to use random number generation.
10. Test without random numbers, force certain scores to happen with a test data set to make sure your game is working properly. All strikes equals a perfect game of 300test that.
(Hints and Assumptions)
1. Design your solution out on paper before you start coding.
2. Design first. Translate into a programming language (Java) second.
3. When the final frame contains a strike or spare, the frame needs to be printed differently. Please study the output transcript above carefully to see how.
Update: I put my play() call in a for loop that called it five times and gave the following output: You need to match one line, or one 10 frame game of this screen capture with your random scores (don't copy my scores down, the game should run dynamically)

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 23:30, nourmaali
4.11 painting a wall (1) prompt the user to input integers for a wall's height and width. calculate and output the wall's area (integer). note that in this case there is a new line after each prompt. (submit for 1 point). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet (2) extend to also calculate and output the amount of paint in gallons needed to paint the wall (floating point). assume a gallon of paint covers 350 square feet. store this value in a variable. output the amount of paint needed using the %f conversion specifier. (submit for 2 points, so 3 points total). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet paint needed: 0.471429 gallons (3) extend to also calculate and output the number of 1 gallon cans needed to paint the wall. hint: use a math function to round up to the nearest gallon. (submit for 2 points, so 5 points total). enter wall height (feet): 11 enter wall width (feet): 15 wall area: 165 square feet paint needed: 0.471429 gallons
Answers: 3
image
Computers and Technology, 24.06.2019 00:00, Kaylaonfleek0956
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
image
Computers and Technology, 24.06.2019 01:30, quintinlarrieu
How would you cite different books by the same author on the works cited page? moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. –––. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. –––. folk songs and ballads. salem: poetry press, 1999. print.
Answers: 2
image
Computers and Technology, 24.06.2019 10:00, noahmace
When writing a business letter, how many times can you use the same merge field in a document? once once, unless using the address block feature unlimited it will depend on the type of document you choose
Answers: 1
Do you know the correct answer?
Write a program that simulates and scores a game of bowling. As background information, here is an e...

Questions in other subjects: