Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You have been delegated to set up an Umpire's helper/Scoreboard Half inning status : Display the menu. The menu is: Item Code Description Item Code
You have been delegated to set up an Umpire's helper/Scoreboard Half inning status :
- Display the menu.
- The menu is:
Item Code Description Item Code Description S Strike H Hit B Ball O Out F Foul Ball R Run in G Game Canceled
- The menu is:
- Prompt for each count for batter and display current status
- Selection based on the entry should accept either upper or lower case
- Following Rules apply
- 3 Strikes = 1 Out
- 3 outs half inning over
- Foul Ball = strike unless it would count as third strike
- 4 balls new batter
- If a Hit produces a Run or an Out You must first enter a H (hit) and then the O (out) or R (run) at the next prompt.
- If an entry other than one of those provided on the menu an error should be displayed and re-prompt for input
- You DO NOT have to make sure that there is a runner on Base for a Run or an Out at this time.
- You also DO NOT have to make sure that all runners either score or get credited an out
- If the item Code of G is entered(at selection menu) it should exit the program immediately otherwise keep repeating.
- The Batter order of 1 through 9 shall be kept. Each successive half inning should begin with the batter in the current rotation. Such that if batter 7 was up when the out occurred then they should be the batter that starts the next half inning. NOTE this will be different for each team. After the 1-9 has batted then should start back at 1 and go up to 9 again.
- Announce when Next Half Inning should begin
- Prompt for another inning (Y or y) = Yes (N or n) = No Do another half inning until No
The output is supposed to look like this
Inning Status Batter # 1 # Balls 0 # Strikes 0 # Outs 0 # Runs 0 1st Batter (Count of 1): S Inning Status Batter # 1 # Balls 0 # Strikes 1 # Outs 0 # Runs 0 1st Batter (Count of 2): X ******* Invalid Please enter S,B,F,G,H,O or R 1st Batter (Count of 2): F Inning Status Batter # 1 # Balls 0 # Strikes 2 # Outs 0 # Runs 0 1st Batter (Count of 3): s Inning Status Batter # 2 # Balls 0 # Strikes 0 # Outs 1 # Runs 0 2nd Batter (Count of 1): H Inning Status Batter # 3 # Balls 0 # Strikes 0 # Outs 1 # Runs 0 3rd Batter (Count of 1): R Inning Status Batter # 3 # Balls 0 # Strikes 0 # Outs 1 # Runs 1 3rd Batter (Count of 1): H Inning Status Batter # 4 # Balls 0 # Strikes 0 # Outs 1 # Runs 1 4th Batter (Count of 1): O Inning Status Batter # 4 # Balls 0 # Strikes 0 # Outs 2 # Runs 1 4th Batter (Count of 1): H Inning Status Batter # 5 # Balls 0 # Strikes 0 # Outs 2 # Runs 1 5th Batter (Count of 1): O Three Outs !!!
I can't use include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started