Hi Guys,
I am fairly new to the world of OOP. I have been reading up on abstract,extending and interface and it can get slightly confusing.
Basically I know i need to create a ‘league’ with 20 teams and a set amount of players.
The way i am doing it, im halfway through and it works so far! But i want to do it exactly right, and not complete it with x amount of bad practises. So i want some reassurance basically
I have a League class, that upon creation, creates an array of Team class. The team class is extending the League class, so team can view the number of teams and the number of players (they are set protected static) and the team on creation, creates all of its player members.
So basically the Player class doesn’t extend the cTeam, but the cTeam extends the cLeague.
There is nothing abstract, and i’m half thinking, that i should have written it that way - as its the proper way?
Is there anything wrong with how i have done it perhaps, or better ways to go about it?
Thanks for reading and hopefully you can help