Hi guys
If I have a Program class with main
and i have a Team class
And in the Team class I have fields
teamName
teamValue
then in Team i want methods
CreateTeam
DeleteTeam
AddTeamValue
ViewTeams
now I know in the constructor in my Program class I can go
Team liverpool = new Team(4.5); - 4.5 billion for example, and whatever other properties for the team etc.
now I have a liverpool team object, but how can I have the user actually name the team and add it to an array?
would the actual team manipulation need to be done in a different method in a different class eg: class TeamWork
method AddTeam
get a variable from the user then somehow use that in
Team userVariable = new Team(4.5);
or can it be done from in the Team class, I find this very confusing when working with objects OOP in general, what takes responsibility where and how.
and what is a good design etc.
I hope you understand the difficulty im having and can point me in the right direction.
If I have a Program class with main
and i have a Team class
And in the Team class I have fields
teamName
teamValue
then in Team i want methods
CreateTeam
DeleteTeam
AddTeamValue
ViewTeams
now I know in the constructor in my Program class I can go
Team liverpool = new Team(4.5); - 4.5 billion for example, and whatever other properties for the team etc.
now I have a liverpool team object, but how can I have the user actually name the team and add it to an array?
would the actual team manipulation need to be done in a different method in a different class eg: class TeamWork
method AddTeam
get a variable from the user then somehow use that in
Team userVariable = new Team(4.5);
or can it be done from in the Team class, I find this very confusing when working with objects OOP in general, what takes responsibility where and how.
and what is a good design etc.
I hope you understand the difficulty im having and can point me in the right direction.