Home / Expert Answers / Computer Science / i-need-all-of-the-classes-and-interfaces-solved-the-photos-have-a-discrebtion-of-every-method-and-cl-pa333

(Solved): i need all of the classes and interfaces solved the photos have a discrebtion of every method and cl ...



i need all of the classes and interfaces solved the photos have a discrebtion of every method and class and interface you dont need the pdf file to read or write from just solve the methods in every class and interface

Class Goalkeeper:
- Attributes:
- cleanSheets: number of matches with clean sheets.Cant be negative.
- goalsConceded: goals
- goalsConceded is less than the matches without clean sheets. ERROR: number of matches without clean sheets must be less th
match by 1 , increases goals by 4 , and decreases hattricks by 1 only if all the following rules are true. It throws an excep
Interface IOInterface:
- New added Methods:
+ loadArrayFromFileUsingDataStream(filename: String)
+ saveArrayToFileUsingDataSt
Interface IOInterface:
- New added Methods:
+ loadArrayFromFileUsingDataStream(filename: String)
+ saveArrayToFileUsingDataSt

i need this step by step code in java
Class Goalkeeper: - Attributes: - cleanSheets: number of matches with clean sheets.Can't be negative. - goalsConceded: goals conceded while playing. Can't be negative. - Methods: + Goalkeeper(name: String, number: int, match: int, cleanSheets: int, goalsConceded: int): throws an exception (Exception) in the following cases: cleanSheets is negative. "ERROR; clean sheets can't be negative." goalsConceded is negative. "ERROR: goals conceded can't be negative." cleanSheets is greater than matches played. "ERROR: clean sheets must be less than matches." - goalsConceded is less than the matches without clean sheets. "ERROR: number of matches without clean sheets must be less than goals conceded." \( + \) getNumOrCleanSheets() + getNumOfGoalsConceded0 + updateData(match: int, cleanSheets: int, goalsConceded: int): increases the goalkeepers amount of games played, clean sheets, and goals conceded. For example, updateData(1,-3,3) increases match by 1 , decreases cleanSheets by 3 , and increases goalsConceded by 3 only if all the following rules are true. It throws an exception (Exception) if: cleanSheets will be negative. "ERROR: clean sheets can't be negative." goalsConceded will be negative. "ERROR: goals conceded can't be negative." cleanSheets will be greater than total matches played. "ERROR: clean sheets must be less than matches." goalsConceded will be less than the total matches without total clean sheets. "ERROR: number of matches without clean sheets must be less than goals conceded." \( + \) toString0: returns the goalkeeper player information GK \( < \) Number \( >:< \) Name \( > \), played \( \langle \) Match \( > \) matches, \( < \) cleanSheets \( > \) clean sheets, \( < \) goalsConceded \( > \) goals conceded. Class Forward: - Attributes: - numOfGoals: number of goals scored.Can't be negative. - numOfHattricks: number of hat-tricks scored. Can't be negative. - Methods: + Forward(name: String, number: int, match: int, goals: int, hattricks: int): throws an exception (Exception) in the following cases: o goals are negative. "ERROR: goals can't be negative." o hattricks are negative. "ERROR: hat-tricks can't be negative." - goals are not 3 times greater than hattricks. "ERROR; goals must be at least 3 times more than hat-tricks." hattricks are more than matches played. "ERROR: can't have more hat-tricks than matches." + getNumOfGoals0 \( + \) getNumOfHattricks() + updateData(match: int, goals: int, hattricks: int): increases the forward amount of games played, goals, and hat-tricks. For example, updateData(1,4,-1) increases match by 1 , increases goals by 4 , and decreases hattricks by 1 only if all the following rules are true. It throws an exception (Exception) if: goals will be negative. "ERROR: goals can't be negative." hattricks will be negative. "ERROR: hat-tricks can't be negative." goals won't be 3 times greater than total hattricks. "ERROR: goals must be at least 3 times more than hat-tricks." - hattricks will be more than matches played. "ERROR: can't have more hat-tricks than matches." \( + \) toString0: returns the forward player information \( < \) Number \( > \) : \( \langle \) Name \( > \), played \( \langle \) Match \( > \) matches, scored \( \langle \) Goals \( > \) goals, \( < \) Hattrics \( > \) hat-tricks. Team: Attributes: - name: the team's name + MAX_PLAYERS: (static constant 30) the maximum number of players in a team. Methods: + Team(name: String): initializes the array's size with MAX_PLAYERS. + addPlayer(p: Player): adds a new player to the team. It throws an exception (Exception) if: - Array is full. "ERROR: Array is full. Player \( < \) p.toString \( 0 \mid> \) was not added." - Another player in the team has the same number (use doesNumberExist(int)). "ERROR: Can't add the player. Another player with the same number exists." \( + \) getNumOfPlayers0: returns the number of players in the team. + doesNumberExist(number: int): returns true if a player in the team has a t-shirt number equal to number. + reset0: empties the players array and sets the number of players to 0 . + displayAll0: displays all the players information using their toString 0 . \( + \) loadArrayFromFile(filename: String): reads the Player objects from the file filename and stores them into the players array and updates the number of players.It throws the exceptions (IOException) that the file reading objects throw. + saveArrayToFile(filename: String): saves all the Player objects into the file filename. It throws the exceptions (IOException) that the file writing objects throw. Interface IOInterface: - New added Methods: + loadArrayFromFileUsingDataStream(filename: String) + saveArrayToFileUsingDataStream(filename: String) Interface IOInterface: - New added Methods: + loadArrayFromFileUsingDataStream(filename: String) + saveArrayToFileUsingDataStream(filename: String) Class Team: - New added Methods: + loadArrayFromFileUsingDataStream(filename: String): reads primitive data from the file filename to create a Goalkeeper or Forward objects and stores them into the players array and updates the number of players. It throws the exceptions (IOException) that the file reading objects throw. It also throws the exception (Exception) the Goalkeeper and Forward constructors throw. + saveArrayToFileUsingDataStream(filename: String): write the player's primitive type data into the file filename. It throws the exceptions (IOException) that the file writing objects throw.


We have an Answer from Expert

View Expert Answer

Expert Answer


IOInterface.java import java.io.IOException; public interface IOInterface { public void loadArrayFromFile(String fileName) throws IOException; public
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe