Question: Create a program in JAVA in which gets the score of a tennis match, the program will ask the user to enter the name of
Create a program in JAVA in which gets the score of a tennis match, the program will ask the user to enter the name of two players, the number of sets they are playing and starting bias eg. Enter player name: Player 1 Enter player name: Player 2 Enter number of sets: 2 Enter percentage of probability: 50
as the percentage is 50, both players have same opportunity to win, Bias should be from 0 to 100. So if the percentage is 100, player 2 is going to win all the way all the points, and if the percentage is 0, player 1 will win all the points. The random binary number should be 8 digits
the program needs to run randomly with binary code, every 0 will be a point for player #1 and every 1 will be a point for player #2. EG output: (imagine the random binary number that was created was 01001100) Player 1 vs Player 2 Player 1 scores 15 - 0 player 2 scores 15 - 15 player 1 scores 30 - 15 player 1 scores 40 - 15 player 2 scores 40 - 30 player 2 scores deuce player 1 scores advantage player 1 player 1 scores, he wins the game the set is 1-0
Eg with 100 percent and 3 sets Player 1 vs Player 2 Player 1 scores 0 - 15 player 2 scores 0 - 30 player 1 scores 0 - 40 player 1 scores he wins the game set is 0-1
Player 1 scores 0 - 15 player 2 scores 0 - 30 player 1 scores 0 - 40 player 1 scores he wins the game
set is 0-2
Player 1 scores 0 - 15 player 2 scores 0 - 30 player 1 scores 0 - 40 player 1 scores he wins the game
set is 0-3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
