Question: You created a class named Game that included two Team objects that held data about teams participating in a game. Modify the Game class to
You created a class named Game that included two Team objects that held data about teams participating in a game. Modify the Game class to set the game time to the message Game cancelled! if the two teams in a game do not have the same value for the sport. (In other words, a girls’ basketball team should not have a game cheduled with a boys’ tennis team.) Save the revised class as Game.java. Write a program to demonstrate a valid and an invalid game.
Step by Step Solution
3.37 Rating (169 Votes )
There are 3 Steps involved in it
public class TestGame2 public static void mainString args Team team1 new TeamRoosevelt High Girls Ba... View full answer
Get step-by-step solutions from verified subject matter experts
