Question: Write a class for soccer game scoring. Provide a constructor that starts each team with a score of zero. Include instance variables to keep the
Write a class for soccer game scoring. Provide a constructor that starts each team with a score of zero. Include instance variables to keep the score for both teams. Include a method to add 1 to the score of the first team and a method to add 1 to the score of the second team. Include a method that displays the score of both teams, and the Main method to test, creating two different soccer games. Score points so the first game is 32 and the second game is 01. Display the scores of each game.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
