A4/.classpath A4/.gitignore /bin/ A4/.project A4 org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature A4/.settings/org.eclipse.jdt.core.prefs eclipse.preferences.version=1...


Use the code base in the attached zip file and create test suite for the team and batter classes.


State your systematic approach to creating test cases.


State the effectiveness of your test suite.






The team and batter files should be under src/assignment




A4/.classpath A4/.gitignore /bin/ A4/.project A4 org.eclipse.jdt.core.javabuilder org.eclipse.jdt.core.javanature A4/.settings/org.eclipse.jdt.core.prefs eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.8 A4/bin/assignment/Batter.class package assignment; public synchronized class Batter extends types.Person implements types.Batting, Comparable { private int games; private int atBats; private int singles; private int doubles; private int triples; private int homeruns; private int walks; private String team; public void Batter(String, String, int, int, int); public int getGamesPlayed(); public void setGamesPlayed(int); public void setAtBats(int); public void setSingles(int); public void setDoubles(int); public void setTriples(int); public void setHomeRuns(int); public void setWalks(int); public int getAtBats(); public int getSingles(); public int getDoubles(); public int getTriples(); public int getHomeRuns(); public int getWalks(); public void setTeam(String); public String getTeam(); public int compareTo(Batter); } A4/bin/assignment/Team.class package assignment; public synchronized class Team { private java.util.List roster; private int missingFieldExceptionCount; private int badNameExceptionCount; private int badNumberExceptionCount; private int totalBattersAddedCount; public void Team(); public int loadBatters(String); public java.util.List playersSortedByDaysSinceBirth(); public java.util.List playersSortedByHomeRuns(); public java.util.List playersSortedByHits(); public java.util.List playersSortedByAtBatsPerGame(); public java.util.List playersSortedByTeamsThenGamesPlayed(); public String readFromFile(String); public boolean isNotNumeric(String); public String writeToFile(String); } A4/bin/comparators/SortByHomeruns.class package comparators; public synchronized class SortByHomeruns implements java.util.Comparator { public void SortByHomeruns(); public int compare(assignment.Batter, assignment.Batter); } A4/bin/comparators/SortByTeamAndGamesPlayed.class package comparators; public synchronized class SortByTeamAndGamesPlayed implements java.util.Comparator { public void SortByTeamAndGamesPlayed(); public int compare(assignment.Batter, assignment.Batter); } A4/bin/comparators/SortedByAtBatsPerGame.class package comparators; public synchronized class SortedByAtBatsPerGame implements java.util.Comparator { public void SortedByAtBatsPerGame(); public int compare(assignment.Batter, assignment.Batter); } A4/bin/comparators/SortedByHits.class package comparators; public synchronized class SortedByHits implements java.util.Comparator { public void SortedByHits(); public int compare(assignment.Batter, assignment.Batter); } A4/bin/Driver/A3Driver.class package Driver; public synchronized class A3Driver { public static final String smallDataBatter = Team,First Name,Last Name,YOB,MOB,DOB,Games Played,At-Bats,Single,Double,Triple,HomeRuns,Walked ATL,A. J.,Minter,1993,9,2,36,0,0,0,0,0,0 TOR,Reese,McGuire,1995,3,2,30,97,14,29,7,0,0 ATL,Adam,Duvall,1988,9,4,41,120,17,32,4,1,0 TOR,Freddy,Galvis,1989,11,14,115,450,55,120,24,1,1 ATL,Alex,Jackson,1995,12,25,4,13,0,0,0,0,0 ; public void A3Driver(); public static void main(String[]); } A4/bin/Driver/A4Driver.class package Driver; public synchronized class A4Driver { public void A4Driver(); public static void main(String[]); } A4/bin/Driver/AllBadData.csv Team,First Name,Last Name,YOB,MOB,DOB,Games Played,At-Bats,Single,Double,Triple,HomeRuns Given Up ,Walked ,Abraham,Almonte,1989,6,27,17,31,11,9,3,1,0 ARI,1234,Jones,1985,8,1,137,485,66,126,25,1,1 ARI,Alex,Avila,Seventy,1,29,63,164,22,34,8,0,0 A4/bin/Driver/AllGoodData.csv Team,First Name,Last Name,YOB,MOB,DOB,Games Played,At-Bats,Single,Double,Triple,HomeRuns Given Up ,Walked HOU,Abraham,Almonte,1989,6,27,17,31,11,9,3,1,0 ARI,Bob,Jones,1985,8,1,137,485,66,126,25,1,1 ARI,Alex,Avila,1975,1,29,63,164,22,34,8,0,0 A4/bin/Driver/BadWriteFile.txt TEAM, First Name, Last Name, Games Played ========================================= A4/bin/Driver/WrittenFile.txt TEAM, First Name, Last Name, Games Played ========================================= ATL,ADAM,DUVALL,41 ATL,A. J.,MINTER,36 ATL,ALEX,JACKSON,4 TOR,FREDDY,GALVIS,115 TOR,REESE,MCGUIRE,30 A4/bin/FileForWriteData.txt TEAM, First Name, Last Name, Games Played ========================================= ATL,FREDDIE,FREEMAN,158 ATL,ADAM,DUVALL,41 ATL,A. J.,MINTER,36 ATL,ALEX,JACKSON,4 CHN,ADDISON,RUSSELL,82 CHN,ADBERT,ALZOLAY,4 MIA,ADAM,CONLEY,60 NYN,ADEINY,HECHAVARRIA,60 TOR,FREDDY,GALVIS,115 TOR,JONATHAN,DAVIS,37 TOR,REESE,MCGUIRE,30 A4/bin/FileForWriteDataBad.txt TEAM, First Name, Last Name, Games Played ========================================= ATL,FREDDIE,FREEMAN,158 ATL,ADAM,DUVALL,41 ATL,A. J.,MINTER,36 ATL,ALEX,JACKSON,4 CHN,ADDISON,RUSSELL,82 CHN,ADBERT,ALZOLAY,4 MIA,ADAM,CONLEY,60 NYN,ADEINY,HECHAVARRIA,60 TOR,FREDDY,GALVIS,115 TOR,JONATHAN,DAVIS,37 TOR,REESE,MCGUIRE,30 A4/bin/FileForWriteDataGood.txt TEAM, First Name, Last Name, Games Played ========================================= ATL,FREDDIE,FREEMAN,158 ATL,ADAM,DUVALL,41 ATL,A. J.,MINTER,36 ATL,ALEX,JACKSON,4 CHN,ADDISON,RUSSELL,82 CHN,ADBERT,ALZOLAY,4 MIA,ADAM,CONLEY,60 NYN,ADEINY,HECHAVARRIA,60 TOR,FREDDY,GALVIS,115 TOR,JONATHAN,DAVIS,37 TOR,REESE,MCGUIRE,30 A4/bin/types/Batting.class package types; public abstract interface Batting { public abstract int getGamesPlayed(); public abstract void setGamesPlayed(int); public abstract void setAtBats(int); public abstract void setSingles(int); public abstract void setDoubles(int); public abstract void setTriples(int); public abstract void setHomeRuns(int); public abstract void setWalks(int); public abstract int getAtBats(); public abstract int getSingles(); public abstract int getDoubles(); public abstract int getTriples(); public abstract int getHomeRuns(); public abstract int getWalks(); public abstract void setTeam(String); public abstract String getTeam(); } A4/bin/types/Person.class package types; public abstract synchronized class Person { private String fName; private String lName; private java.time.LocalDate dob; public void Person(String, String, int, int, int); public String getfName(); public String getlName(); public String toString(); public boolean equals(Object); public String computeAge(); public long daysSinceBirth(); } A4/build.xml
Apr 20, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here