Task 1. Design and implement classes SportsClub (abstract class), FootballClub. Classes should include appropriate methods and hold information about name of the club, its location and various statistics about the club. FootballClub should include statistics such as how many wins, draws and defeats an instance of it has achieved in the season, the number of goals received and scored. The number of points that a club currently has, and number of matches played.
Task 2. Implement a class PremierLeagueManager which extends interface LeagueManager. PremierLeagueManager class maintains a number of football clubs which play in the premier league. The class should create a menu based on text input and give the user the choice of: •
Create a new football club and add it in the premier league. •
Delete (relegate) an existing football club from the premier league
- Display the various statistics for a selected club.
- Display the Premier League Table
I designed abstract class
public abstract class SportsClub {
int position;
String name;
int points;
int wins;
int defeats;
int draws;
int totalMatches;
int goalF;
int goalA;
int goalD;
String location;
}
I extended the abstract class I know I can use the get/set method but I used contructor to initialise (correct me if I'm worng)
public class FootballClub extends SportsClub {
FootballClub(int position, String name,
int points, int wins,
int defeats, int draws,
int totalMatches, int goalF,
int goalA, int goalD) {
this.position = position;
this.name = name;
this.points = points;
this.wins = wins;
this.defeats = defeats;
this.draws = draws;
this.totalMatches = totalMatches;
this.goalF = goalF;
this.goalA = goalA;
this.goalD = goalD;
}
}
Now I need to write an interface which I know how to do it but I'm trying to get my head around that am I declaring the methods inside interface or shall i do it in abstract class. Basically I need a help how I can approach to this whole excersie. Dont know what class I should be using for main method. I'm a new learner and really confused if somebody help me out on that about how should I approach I'm sure I will be able to do it myself. Not asking for code need help if somebody simplify me this whole excerise please