Question: You have just been tasked with writing the software for your local bowling alley. You must simulate bowling with random numbers and make sure your



You have just been tasked with writing the software for your local bowling alley. You must simulate bowling with random numbers and make sure your software can keep score for different players in a game you are not familiar with bowling, then you can read these instructions on how to play the game and keep score: htt bowling about.com/od/rulesofthegame/a/bowlingscoring.htm Our game can have 1-5 players, and it allows users to play again with a different number of players at the end of a game. The game begins by asking for the number of players and prompting each player for their name (storing it in a C-style string/character array, not a C+ string/object! Then, the players can begin to bowl There are 10 total frames in a game, and for each frame, a player is given up to 2 bowls (chances) to knock down 10 total pins, except in the last frame when a player might get a 3rd chance/bowl. With the first bowl of any frame, a player can knock down 0-10 pins, and with the second bowl, a player can knock down 0 to those left remaining from the first bowl. If the player knocks down all 10 pins in their first bowl of a frame, then that is called a strike (denoted with an X), and the player doesn't get a second bowl/chance to knock down any remaining pins. If a player knocks down 0 pins, this is called a gutter ball and denoted with a dash, and if a player knocks down all 10 pins in a frame using two bowls, then it is called a spare (denoted with a forward slash, For each player, you must keep an array of pins knocked down with each bowl for each frame, and display this information after each bowl The score for a frame is determined by the total number of pins knocked down, but if the player makes a strike or spare, then the scoring is based on subsequent bowls. For a strike, the player receives a 10 plus the number of pins knocked down with the next two bowls. This can give a player 10-30 points for a frame with a strike! For a spare, the player receives a 10 plus the number of pins knocked down with the next bowl. This can give a player 10-20 points for a frame with a spare! Since a player might strike or spare in the 10th frame, then there is a 3'd bowl provided for a strike thrown with the first bowl or a spare thrown with both bowls of the 10th frame. For each player, you must keep an array with a sum of current and prior frame scores that is displayed with each frame A player's total score is the sum of all 10 frame scores. You must keep an array of total scores for all players that is updated and displayed after each bowl or frame. The player who has the most points at the end of 10 frames is the winner! A few game specifics The game scoresheet consists of player names with frame and total information. The frame information consists of the number of pins knocked down with each bowl in each frame and the sum of current and prior frame scores for each frame After each bowl, you must print the scoresheet for the users displaying information about the number of pins knocked down and possibly updated total score After each frame that isn't a strike or spare, you must print the scoresheet for the users displaying information with total frame scores and a total score, if they can be calculated at that time There are 10 total frame scores and possibly 21 bowls for each player Bowling: A player gets two bowls/chances to knock down 10 pins in each of the 10 frames
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
