Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design and upload pseudocode that will represent a single frame in a bowling game. Your logic should determine if the frame was a strike, spare

Design and upload pseudocode that will represent a single frame in a bowling game. Your logic should determine if the frame was a "strike", "spare" or just the score of the 2 rolls.
1. A **STRIKE** is when all 10 pins are knocked down on the first roll of the frame, and it is represented by 'X', no 2nd roll is taken for this frame.
2. A **SPARE** is when all 10 pins are knocked down over the two rolls of a frame, and it is represented by '/'.
3. If neither a STRIKE nor a SPARE occurs, the score for the frame is simply the total number of pins knocked down in the two rolls.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions