a) Update the Player class so that rather than holding a field of type PairOfDice, it instead holds a field of type Rollable. You will then need to update the three-argument custom constructor so it accepts any Rollable type, however the other constructors can assign a default object of your choice to this variable, so long that it is rollable.
b) The getPairOfDice method should be updated to getRollable, with a return type of Rollable.
c)You should run the unit tests in PlayerTest and check the progress you have made for this question and the general design of the class you started in the previous exercise.
d) Add a further void method setFullPlayerName(…) that accepts a single String argument (e.g. “Joe Bloggs”) and then uses this to set the first and family name individually by extracting the relevant information and then calling the respective setter methods of the Name class. The first and family name should be capitalised (e.g. to “Joe” and “Bloggs”) regardless of the case of the string argument – so both “JOE BLOGGS” and “joe bloggs” should generate the same result.
e) Add a further void method generateGamerTag(…) that accepts an int argument and then uses this to generate a gamertag. The method should firstly ensure the number provided is between 1 and 100 – anything outside of this range should result in no change. If the number provided is legitimate, the gamertag should be updated to be the player’s full name in reverse order (in lowercase and with no whitespace) with the given number appended. For example, if the number 50 was provided and the player’s name was “Joe Bloggs”, the gamertag should be set to “sggolbeoj50”.
f) a class called PlayerApp that has a method called execute, which accepts an ArrayList and an int value and returns a String. Currently, it simply returns an empty string. It should however do the following: • Return a String that contains the name of each player (which meets the criteria noted below *) in the ArrayList participants in the format: “FIRSTNAME, surname”, e.g. “JOE, bloggs”, each followed by a new line. • * only players whose gamertag contains their surname (regardless of case) as well as the int number passed as a parameter to the execute method.
Everything should contain Javadoc.