Question
Volleyball Scoring Program: C++ In beach volleyball, each team consists of 2 players. You are given a task to create a program that will track
Volleyball Scoring Program: C++
In beach volleyball, each team consists of 2 players. You are given a task to create a program that will track the scores of each player of the team, in which determines the winner of the set.
Team A
- Player 1
- Player 2
Team B
- Player 1
- Player 2
Sample Program Run:
Score of Team A is 0. Score of Team B is 0.
Enter Team to add score: A
Enter Player # to add score: 1
Score of Team A is 1. Score of Team B is 0.
Enter Team to add score: B
Enter Player # to add score: 2
Score of Team A is 1. Score of Team B is 1.
The entering of score ends until a particular team reaches 25. Also consider the rule of Deuce, when both team reaches 24, one team will be declared as a winner when they gain 2-pt lead vs opponent.
Display the winner as well as the player of the game. For example:
Team A wins with 25 points. Player of the game is player 1.
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