Using Set in Java for putting all data in one collecion
Hi,everyone! I am very very new in Java - I stage student and I have never done it before.
Problem is that I need to do following( what is in bold!! other is beginning which I finished already):
A local football club wishes to store information on its current squad of players:
Each Player’s personal information (first name, last name, age, height and weight) should be recorder in a class Person. Each Player’s record for the season should be stored in a class Player. The information stored for each player consists of the number of games played and* goals scored. Write a class Goalkeeper which in addition records the number of penalties that the goalkeeper has saved. Provide appropriate methods for accessing this information. You should make appropriate use of inheritance in your solution.
Information on all Players should be stored in a class Club. Club stores the name of the club and maintains information about all of it's players.
As I said, I ve written Person's,Player's,Goalkeeper's classes with inheritance. Everything works fine, but now I have to put all info in Club class.
I know I can use ArrayList or Sets (Collections) Am I right with that? But the problem is that I do not really get it, would be happy to receive any help(structure,order etc.)