A hоt site prоvides оffice spаce, but the customer must provide аnd instаll all the equipment needed to continue operations
The Gаme clаss is used tо stоre the scоres of а home team and an away team in a game. A partial declaration of the Game class isshown.public class Game{ /** * Returns the home team's score for this game */ public int getHomeScore() { /* implementation not shown */ } /** * Returns the away team's score for this game */ public int getAwayScore() { /* implementation not shown */ } /* There may be instance variables, constructors, and methods that are not shown. */} The Season class maintains an ArrayList of Game objects named allGames. A partial declaration of the Season class is shown.public class Season{ /** The list of all games played during the season */ private ArrayList allGames; /** * Returns the number of games in the longest streak of * consecutive games where the home team scored more than * the away team * Preconditions: allGames is not empty. * No elements of allGames are null. * Postcondition: allGames is unchanged. */ public int getLongestHomeWinStreak() { /* to be implemented */ } /* There may be instance variables, constructors, and methods that are not shown. */}Write the Season method getLongestHomeWinStreak. The method should return the number of games that make up the longestwinning streak by the home team. A winning streak is a number of consecutive games won by a team. A game is considered a win forthe home team if the home team score is greater than the away team score.For example, suppose allGames contains the following Game objects. The shaded elements represent home team wins. For these contents of allGames, the method getLongestHomeWinStreak() should return 3 because the longest winning streak forthe home team is 3 games.2. Complete method getLongestHomeWinStreak./*** Returns the number of games in the longest streak of * consecutive games where the home team scored more than* the away team* Preconditions: allGames is not empty.* No elements of allGames are null.* Postcondition: allGames is unchanged.*/public int getLongestHomeWinStreak()