Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 7.2 [*Portfolio A.2*] Download the existing Java Project that can be extracted from the PortfolioPlayer.zip file, and imported into Eclipse. This question forms the

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Question 7.2 [*Portfolio A.2*] Download the existing Java Project that can be extracted from the "PortfolioPlayer.zip" file, and imported into Eclipse. This question forms the second part of Portfolio case study A, and you will need to have already attempted Portfolio Al from the previous exercise. Copy your Player class from the previous exercise into the st> lib package of the Portfolio Player project. Study the UML diagram below - you should see the Rollable hierarchy and a familiar Player class, that you started working on in the previous exercise. Player Name interface Rollable - getScorint + rol void Pair Oriee Die MultipleDics - getScored in rol vald 2 + getScore.it - rolo void + petScorel) in rok) void CTEC2905 Object Oriente Design Exercise 7: Interfaces In the test lib package you have been given a JUnit Test Case Player Test conluining unil lests, which will be used to mark your implementation of the Player class. You can use it to gain progressive feedback on your design, however, some tests will not pass at this stage und are designed to test functionality that you will add later in this exercise. It is important that you use the same method signatures and return types as those specified in the test program, c.g. note the method called "setFullPlayerName" invoked in the testSctFullPlayerName unit test meaning this exact name needs to be used for the corresponding method in your Player class. 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-urgument 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 rolluble. b) The getPair OfDice method should be updated to getRollable, with a return type of Rollable. c) You should run the unit tests in Player Test 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 (c.g. "Joc 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 generateGamer l'ag(...) 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 gameitag should be updated to be the player's full name in reverse order (in lowercase and with no whitespace) with the given numher appended. For example, if the number 50 was provided and the player's name was "Joe Bloggs", the gamertag should be set to "sgyolbeojo". D) In the sre > main package, you will notice a class called Player App that has a method called execute, which accepts an ArrayListmain package there is a further JUnit Test Case Player App Test containing a unit test called testExecute, which assesses whether the execute method behaves correctly Please note: Your solution to part f) will be marked by using a different input data set of players within the list to ensure your solution works dynamically based upon any given data set and is not hardcoded in any way, g) As this is a portfolio question, you should update the Javadoc you have previously written for the Player class where necessary to ensure it accurately reflects the updated class. X Dia.java TH 21 1 13 16 25 21 25 36 eclipse-workspace - Week7/src.startingPlayer 1 b/Die.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help DHONOGPRE 119.64492 Package Explorer Playlist.java Register.java Namejava PairoDirejava ES > Week? srestarting Player libDie > Week 10 11 1h Week7 Apart Ottorin tre con i src.portfolio Register Die Idee, som ly its roue we lib The die berolled to ser.. > D Naime.java - The Date the albe state and therefore > Register java main > test slis olas dirigeants P1 { > JRE System Library JavaSE-1.8] 16 1: private int sadea > JUnit 4 11 src.aggregation Adator instance 'tutic modofir with the www wvw by all instances of Dia. employeeRegister private static urard-rew Hunda); Date.java Employee.java 2. Ar Urlaull conclur the Jin with sinks. 26 This old to contre initiales Employee Register.java Name.java public 04 31 thasle); // ulls vs. Nicht the devil of sie sitkos playlist } Playlistjava Crated with the tune of the Seng.java The die is rolled w BiH u mundo inili su > Domain sides the files the die wilt uw > src.composition poble in the sides des; src.startingPlayer this.lt 1 valib Die.java Name.java Hold the due to give the next score. The core in les in the 1.si. in l.iur. Pair OfDice.java . Player.java public vode. > Rollable java Week: 9 utama the number of aide on the daw > src.pricePolicy Brutum Iuf dea on the w JRE System Library JavaSE-1.8] publie antywis.a) i > pricePolicy return the ] > Bsrc.comparable terable exemple Rulams LIN LINE PLUuri > src.countable return the current los volue of the in > src.interfaces src.portfolioplayer public int gets lib retim ore; ! Din.java TI let.mn textual reportion at the dia. Name.java PairoDice.java return a textul recreation of the dir. Rollable java puble Storing > main return Cedar, sore. > test EXC... this. This only at the art is not nul. and Diest that was the 10 12 51 52 be 67 38 H BL F B Protest if the given intents and to the ti false hvis BU 1 public boolean walajes ( tal cases it all dan + (obj - this.txb.com return falco ins) i dorast to thirt red at the ar they to retum this.si - rius 3S this. Y = ULIPW; } 00 DEBU on . Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items! > Warnings 1 item) Resource Path Location Writable Smart Insert O BI = A 3 ENG 17:48 09/01/2021 X 4 7 B 13 eclipse-workspace - Week7/src.starting Player/db/PairofDice.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help DHONO-2964 PE3119.644-4-2 Package Explorer Sangjava Playlist.java Register.java Name.java Pair OfDice.java * " ES > Week? srestarting player lib Pair OfDice equals(Object): boolean > Week 10 11 1 package lib; 2 Week7 3e / src.portfolio Register lib 5 * A pair of dice is a composition of two die instances, > D Naime.java 7 > Register java * Gauthor la */ main > test 10 public class Pairofoice implements Rollable { 11 > JRE System Library JavaSE-1.8] 12 //Fields >JUnit 4 private Die red; src.aggregation 14 private Die blue; 15 16 employeeRegister 17 //Constructor's Date.java 189 public PairoDice) { Employee.java 19 red = new Die(); 20 blue - new Die(); Employee Register.java 21 } Name.java 22 playlist 238 public PairOfDice (Die red, Die blue) { Playlistjava 24 this.red - red; 25 this.blue = blue; Seng.java } > Domain 27 > src.composition 28 29 //Methods src.startingPlayer 360 override 31 public void roll() { Die java 32 red.rall(); Name.java 33 blue.roll(); 34 } Pair OfDice.java 35 Player.java 360 verrida Rollable java 37 public int getscore) { 38 Week 9 return red.gatScore() + blue-getScore(); 39 } > Esrc.pricePolicy 48 > JRE System Library JavaSE-1.8] 410 public Die getRed) ( > pricePolicy 42 return red; 43 } > src.comparable iterable example 44 > src.countable 45= public Die getblue() { > src.interfaces 46 return blue; 47 ) src.portfolioplayer 48 lib override Die.java Age public String tostring() { Name.java 51 return "Pairofdice:[red-" + red + ", blue-" + blue + "1"; 52 PairoDienjava } 53 Rollable java @Override > main 355 public boolean equals(object obj) { > test // test exceptional cases, i.e.obj not null and is a Die 357 if (abi -- null || this.getClass() !- obj.getClass()) 358 return false; 359 350 Patrofdice other - (Pairofoice) obji // downcast to a Patrofdice object ai 352 //a Pairofpice is equal if both the red and blue Die are equal 2015 return this.blue.equals(other.blue) && this.red.equals(other.red); 364 ) } 65 66 ) SHUSL de gent grange Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items! > Warnings 1 item) Resource Path Location Writable Smart Insert on Omo 17:47 O BI = A D! ENG 09:01/2021 Rollable java eclipse-workspace - Week8_9/src.portfolioplayer/lib/Rollable.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help D.HOOQ.# OPR31131-46 ---- Package Explorer X Register.java Namejava Die.java Namejava ESC Week_9 sec portfolioplayer Glib Rollable > Week 10 11 1 package lib; ; Week7 2 > srcportfolio Register 30/+* This interface imposes two common 'rollable' test 4 * behaviours on the objects of each class that 5 RE System Library JavaSE-1.8] + implements it. > JUnit 4 6 7 src.aggregation * @author la/lz 8 +/ lib 9 public interface Rollable { > BemployeeRegister 10 playlist 11 public void roll(); PlayList.java 12 Song java 13 public int getScore(); > main 14 > src.composition 15 > src.startingPlayer 16 Weeka_9 > Osrc.pricePolicy > LIRE System Library (lavast-1.0] > pricePolicy > src.comparable iterable example > src.countable > src.interfaces src.portfolio player Die java Namne.java Pair OfDice.java Rellable.java > main >test Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items! > Warnings 1 item) Resource Path Location Writable Smart Insert O BI = A - ENG 17:49 09/01/2021 X 5 eclipse-workspace - Week8_9/sc.portfolioplayer/main/Player App.jave - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help HONO-2.964 PE3119.00 1 Package Explorer X "Register.java Namp.java Namejawa Rollable.java PlayerApp.java X EES' Weeka 9 src portfolioplayer main playerApp > Week 10 11 1 package main; Week7 2 > srcportfolio Register 3 import java.util.ArrayList; test 6 RE System Library JavaSE-1.8] 7 public class Player App { > JUnit 4 96 src.aggregation public static String execute(ArrayList participants, int number) { 10 lib 11 return i > employeeRegister 12 } playlist 13 PlayList.java 14 } Song java 15 > main > src.composition > src.startingPlayer Weeka_9 > Osrc.pricePolicy > LIRE System Library (lavast-1.0] > pricePolicy > src.comparable iterable example > src.countable > rc.interfaces src.portfolio player Die java Name.java Pair OfDice.java Rellable.java main Player App.java > test Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items! > Warnings 1 item) Resource Path Location Writable Smart Insert O BI = A - ENG 17:49 09/01/2021 X eclipse-workspace - Week/src.starting Player 1 b/Neme.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help D'ALB @ WIND-RW G-PRE TIL 1-&4-4B Package Explorer Playlistjava Register.java Pair OfDica.java Die.java ES! Week7 srcstarting Player libName > Week 10 11 1 package 15b Week7 src.portfolio Register Ane has a lart nanc and lynne There is an option to procuCe J full move by combining these Name.java >> " author Luke public class are implements Comparableres 111 71 > Name.java > Register java > main > test > JRE System Library JavaSE-1.8] > JUnit 4 src.aggregation /Fields private String first private String familytare; 12 13 71 19 1 1.0 111 19 28 21 22- Constructors publie Ware) firstha Family ) puhlie Wer(Stringir, Eins fusil) { this first firs; ; this family mily ) 25 26 employeeRegister Date.java Employee.java Employee Register.java Name.java playlist Playlistjava Seng.java > main > src.composition src.startingPlayer 20 38 31 32 30 public void lix String fir ID) { this.fimi- firmi ) public void - Islas String fasily) { this family far ) 34 35 36 32 38 39 48 410 public Strite rin) return first ) public Strine trail) { return family ) 43 44 450 46 public String Rotrullar If (irsthave..als("") & PavilyMare.equals(""){ return": } else return firsthave lytare; 1 49 Die java Name.java Pair OfDice java Player.java Rollable java Week: 9 > src.pricePolicy JRE System Library JavaSE-1.8] > pricePolicy > src.comparable iterable example > src.countable > src.interfaces src.portfolioplayer lib Din.java Name.java Pairo Dijava Rollable java > main > Gatest 51 Override public Stina tostri return "Nare: 11stic listans farly Manic-fondla" 1 Override public boolean USI(object ob1) I // test exceptional cases, 1.c. cbs not null and 13 3 Mon if (ob - wll this.gctuac:) !-001. RotClass()) return false; 61 62 Nare other - (Nanc) obs; // conncast to 3 Hanc object 1 comparc tirst & taraly names using String's cquals() rethod return this.turilyMonc,suals (other.tarilyNarc) this.Firsthaw.cascotherarthane); TH Override public int corpare o are other) { int result this.fonile.compare other. milyowe); result this.firsture.coreleither.firs); return rull ) 29 NH 11 112 Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items) > Warnings (1 item) Resource Path Location Namejava - Week7/src starting Player/lib BE A E ENG 17:48 09/01/2021 Question 7.2 [*Portfolio A.2*] Download the existing Java Project that can be extracted from the "PortfolioPlayer.zip" file, and imported into Eclipse. This question forms the second part of Portfolio case study A, and you will need to have already attempted Portfolio Al from the previous exercise. Copy your Player class from the previous exercise into the st> lib package of the Portfolio Player project. Study the UML diagram below - you should see the Rollable hierarchy and a familiar Player class, that you started working on in the previous exercise. Player Name interface Rollable - getScorint + rol void Pair Oriee Die MultipleDics - getScored in rol vald 2 + getScore.it - rolo void + petScorel) in rok) void CTEC2905 Object Oriente Design Exercise 7: Interfaces In the test lib package you have been given a JUnit Test Case Player Test conluining unil lests, which will be used to mark your implementation of the Player class. You can use it to gain progressive feedback on your design, however, some tests will not pass at this stage und are designed to test functionality that you will add later in this exercise. It is important that you use the same method signatures and return types as those specified in the test program, c.g. note the method called "setFullPlayerName" invoked in the testSctFullPlayerName unit test meaning this exact name needs to be used for the corresponding method in your Player class. 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-urgument 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 rolluble. b) The getPair OfDice method should be updated to getRollable, with a return type of Rollable. c) You should run the unit tests in Player Test 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 (c.g. "Joc 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 generateGamer l'ag(...) 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 gameitag should be updated to be the player's full name in reverse order (in lowercase and with no whitespace) with the given numher appended. For example, if the number 50 was provided and the player's name was "Joe Bloggs", the gamertag should be set to "sgyolbeojo". D) In the sre > main package, you will notice a class called Player App that has a method called execute, which accepts an ArrayListmain package there is a further JUnit Test Case Player App Test containing a unit test called testExecute, which assesses whether the execute method behaves correctly Please note: Your solution to part f) will be marked by using a different input data set of players within the list to ensure your solution works dynamically based upon any given data set and is not hardcoded in any way, g) As this is a portfolio question, you should update the Javadoc you have previously written for the Player class where necessary to ensure it accurately reflects the updated class. X Dia.java TH 21 1 13 16 25 21 25 36 eclipse-workspace - Week7/src.startingPlayer 1 b/Die.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help DHONOGPRE 119.64492 Package Explorer Playlist.java Register.java Namejava PairoDirejava ES > Week? srestarting Player libDie > Week 10 11 1h Week7 Apart Ottorin tre con i src.portfolio Register Die Idee, som ly its roue we lib The die berolled to ser.. > D Naime.java - The Date the albe state and therefore > Register java main > test slis olas dirigeants P1 { > JRE System Library JavaSE-1.8] 16 1: private int sadea > JUnit 4 11 src.aggregation Adator instance 'tutic modofir with the www wvw by all instances of Dia. employeeRegister private static urard-rew Hunda); Date.java Employee.java 2. Ar Urlaull conclur the Jin with sinks. 26 This old to contre initiales Employee Register.java Name.java public 04 31 thasle); // ulls vs. Nicht the devil of sie sitkos playlist } Playlistjava Crated with the tune of the Seng.java The die is rolled w BiH u mundo inili su > Domain sides the files the die wilt uw > src.composition poble in the sides des; src.startingPlayer this.lt 1 valib Die.java Name.java Hold the due to give the next score. The core in les in the 1.si. in l.iur. Pair OfDice.java . Player.java public vode. > Rollable java Week: 9 utama the number of aide on the daw > src.pricePolicy Brutum Iuf dea on the w JRE System Library JavaSE-1.8] publie antywis.a) i > pricePolicy return the ] > Bsrc.comparable terable exemple Rulams LIN LINE PLUuri > src.countable return the current los volue of the in > src.interfaces src.portfolioplayer public int gets lib retim ore; ! Din.java TI let.mn textual reportion at the dia. Name.java PairoDice.java return a textul recreation of the dir. Rollable java puble Storing > main return Cedar, sore. > test EXC... this. This only at the art is not nul. and Diest that was the 10 12 51 52 be 67 38 H BL F B Protest if the given intents and to the ti false hvis BU 1 public boolean walajes ( tal cases it all dan + (obj - this.txb.com return falco ins) i dorast to thirt red at the ar they to retum this.si - rius 3S this. Y = ULIPW; } 00 DEBU on . Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items! > Warnings 1 item) Resource Path Location Writable Smart Insert O BI = A 3 ENG 17:48 09/01/2021 X 4 7 B 13 eclipse-workspace - Week7/src.starting Player/db/PairofDice.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help DHONO-2964 PE3119.644-4-2 Package Explorer Sangjava Playlist.java Register.java Name.java Pair OfDice.java * " ES > Week? srestarting player lib Pair OfDice equals(Object): boolean > Week 10 11 1 package lib; 2 Week7 3e / src.portfolio Register lib 5 * A pair of dice is a composition of two die instances, > D Naime.java 7 > Register java * Gauthor la */ main > test 10 public class Pairofoice implements Rollable { 11 > JRE System Library JavaSE-1.8] 12 //Fields >JUnit 4 private Die red; src.aggregation 14 private Die blue; 15 16 employeeRegister 17 //Constructor's Date.java 189 public PairoDice) { Employee.java 19 red = new Die(); 20 blue - new Die(); Employee Register.java 21 } Name.java 22 playlist 238 public PairOfDice (Die red, Die blue) { Playlistjava 24 this.red - red; 25 this.blue = blue; Seng.java } > Domain 27 > src.composition 28 29 //Methods src.startingPlayer 360 override 31 public void roll() { Die java 32 red.rall(); Name.java 33 blue.roll(); 34 } Pair OfDice.java 35 Player.java 360 verrida Rollable java 37 public int getscore) { 38 Week 9 return red.gatScore() + blue-getScore(); 39 } > Esrc.pricePolicy 48 > JRE System Library JavaSE-1.8] 410 public Die getRed) ( > pricePolicy 42 return red; 43 } > src.comparable iterable example 44 > src.countable 45= public Die getblue() { > src.interfaces 46 return blue; 47 ) src.portfolioplayer 48 lib override Die.java Age public String tostring() { Name.java 51 return "Pairofdice:[red-" + red + ", blue-" + blue + "1"; 52 PairoDienjava } 53 Rollable java @Override > main 355 public boolean equals(object obj) { > test // test exceptional cases, i.e.obj not null and is a Die 357 if (abi -- null || this.getClass() !- obj.getClass()) 358 return false; 359 350 Patrofdice other - (Pairofoice) obji // downcast to a Patrofdice object ai 352 //a Pairofpice is equal if both the red and blue Die are equal 2015 return this.blue.equals(other.blue) && this.red.equals(other.red); 364 ) } 65 66 ) SHUSL de gent grange Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items! > Warnings 1 item) Resource Path Location Writable Smart Insert on Omo 17:47 O BI = A D! ENG 09:01/2021 Rollable java eclipse-workspace - Week8_9/src.portfolioplayer/lib/Rollable.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help D.HOOQ.# OPR31131-46 ---- Package Explorer X Register.java Namejava Die.java Namejava ESC Week_9 sec portfolioplayer Glib Rollable > Week 10 11 1 package lib; ; Week7 2 > srcportfolio Register 30/+* This interface imposes two common 'rollable' test 4 * behaviours on the objects of each class that 5 RE System Library JavaSE-1.8] + implements it. > JUnit 4 6 7 src.aggregation * @author la/lz 8 +/ lib 9 public interface Rollable { > BemployeeRegister 10 playlist 11 public void roll(); PlayList.java 12 Song java 13 public int getScore(); > main 14 > src.composition 15 > src.startingPlayer 16 Weeka_9 > Osrc.pricePolicy > LIRE System Library (lavast-1.0] > pricePolicy > src.comparable iterable example > src.countable > src.interfaces src.portfolio player Die java Namne.java Pair OfDice.java Rellable.java > main >test Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items! > Warnings 1 item) Resource Path Location Writable Smart Insert O BI = A - ENG 17:49 09/01/2021 X 5 eclipse-workspace - Week8_9/sc.portfolioplayer/main/Player App.jave - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help HONO-2.964 PE3119.00 1 Package Explorer X "Register.java Namp.java Namejawa Rollable.java PlayerApp.java X EES' Weeka 9 src portfolioplayer main playerApp > Week 10 11 1 package main; Week7 2 > srcportfolio Register 3 import java.util.ArrayList; test 6 RE System Library JavaSE-1.8] 7 public class Player App { > JUnit 4 96 src.aggregation public static String execute(ArrayList participants, int number) { 10 lib 11 return i > employeeRegister 12 } playlist 13 PlayList.java 14 } Song java 15 > main > src.composition > src.startingPlayer Weeka_9 > Osrc.pricePolicy > LIRE System Library (lavast-1.0] > pricePolicy > src.comparable iterable example > src.countable > rc.interfaces src.portfolio player Die java Name.java Pair OfDice.java Rellable.java main Player App.java > test Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items! > Warnings 1 item) Resource Path Location Writable Smart Insert O BI = A - ENG 17:49 09/01/2021 X eclipse-workspace - Week/src.starting Player 1 b/Neme.java - Eclipse IDE File Edit Source Refactor Navigate Search Project Run Window Help D'ALB @ WIND-RW G-PRE TIL 1-&4-4B Package Explorer Playlistjava Register.java Pair OfDica.java Die.java ES! Week7 srcstarting Player libName > Week 10 11 1 package 15b Week7 src.portfolio Register Ane has a lart nanc and lynne There is an option to procuCe J full move by combining these Name.java >> " author Luke public class are implements Comparableres 111 71 > Name.java > Register java > main > test > JRE System Library JavaSE-1.8] > JUnit 4 src.aggregation /Fields private String first private String familytare; 12 13 71 19 1 1.0 111 19 28 21 22- Constructors publie Ware) firstha Family ) puhlie Wer(Stringir, Eins fusil) { this first firs; ; this family mily ) 25 26 employeeRegister Date.java Employee.java Employee Register.java Name.java playlist Playlistjava Seng.java > main > src.composition src.startingPlayer 20 38 31 32 30 public void lix String fir ID) { this.fimi- firmi ) public void - Islas String fasily) { this family far ) 34 35 36 32 38 39 48 410 public Strite rin) return first ) public Strine trail) { return family ) 43 44 450 46 public String Rotrullar If (irsthave..als("") & PavilyMare.equals(""){ return": } else return firsthave lytare; 1 49 Die java Name.java Pair OfDice java Player.java Rollable java Week: 9 > src.pricePolicy JRE System Library JavaSE-1.8] > pricePolicy > src.comparable iterable example > src.countable > src.interfaces src.portfolioplayer lib Din.java Name.java Pairo Dijava Rollable java > main > Gatest 51 Override public Stina tostri return "Nare: 11stic listans farly Manic-fondla" 1 Override public boolean USI(object ob1) I // test exceptional cases, 1.c. cbs not null and 13 3 Mon if (ob - wll this.gctuac:) !-001. RotClass()) return false; 61 62 Nare other - (Nanc) obs; // conncast to 3 Hanc object 1 comparc tirst & taraly names using String's cquals() rethod return this.turilyMonc,suals (other.tarilyNarc) this.Firsthaw.cascotherarthane); TH Override public int corpare o are other) { int result this.fonile.compare other. milyowe); result this.firsture.coreleither.firs); return rull ) 29 NH 11 112 Problems X @ Javadoc Declaration 108 errors, 1 waming, O others (Filter matched 101 of 109 items) Description > Errors (100 of 108 items) > Warnings (1 item) Resource Path Location Namejava - Week7/src starting Player/lib BE A E ENG 17:48 09/01/2021

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

2. How will the team select a leader?

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago