Question: Java Code Only! The class outline is below. com.day4 SoccerUtilities - increaseSalary(Player, int) : double - getPlayerByClub(Player[], PlayerClub): Player[] - findManagerWhoCoaches(Coach[], String): ArrayList Method 1:

Java Code Only!

The class outline is below.

com.day4

SoccerUtilities

- increaseSalary(Player, int) : double

- getPlayerByClub(Player[], PlayerClub): Player[]

- findManagerWhoCoaches(Coach[], String): ArrayList

Method 1:

Method getPlayerByClub will take an array of Player and a PlayerClub enum. The method will return an array of students that have match that student year.

For example:

Player[] clubs = SoccerUtilities.getPlayerByClub(players, PlayerClub.Barcelona);

This method should return an array with two players: Lionel Messi and Neymar JR.

If I passed in PlayerClub.RealMadrid, the method would return the following players: Cristiano Ronaldo and Karim Benzema.

TEST IT OUT BY FINDING & CODING:

- Test getPlayerByClub for Lionel Messi (it is an enum)

- Test getPlayerByCLub for Cristiano Ronaldo (another enum)

Method 2:

Method findManagerWhoCoaches will take an array of Coaches and a String containing the subject to look for. The method will return a list of all coaches who coach that team. This search should not be case-sensitive.

TEST IT OUT BY FINDING & CODING:

- Test findManagerWhoCoaches for "barcelona" (not an enum)

-Test findManagerWhoCoaches for "real madrid" (not an enum)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!