CodeLiftsleep
Member
- Joined
- Mar 11, 2016
- Messages
- 20
- Programming Experience
- 3-5
Working on a football game and I have the following classes for Generation of players, coaches, etc.
Person which contains child classes Personnel and Players, and then Coaches and scouts which are child classes of personnel. Here is the issue I have. Inheritence is set up properly
I would like to have one call to generate whatever sub class of person type I am using, where I provide an Enum or string to Person's sub New and have it locate the correct type of person to create.
The issue is I am calling it from the main project but the instantiation isn't recognized from there in the Generation project. I don't want a bunch of code in the main project, I want it to remain clean and have all that extra code remain in the Generation Class. Another issue is that it needs to generate the number of these people/sub people passed in so I am declaring it as an array as in Public MyPerson() as Person, then having to instantiate each one.
Any help would be appreciated.
Person which contains child classes Personnel and Players, and then Coaches and scouts which are child classes of personnel. Here is the issue I have. Inheritence is set up properly
I would like to have one call to generate whatever sub class of person type I am using, where I provide an Enum or string to Person's sub New and have it locate the correct type of person to create.
The issue is I am calling it from the main project but the instantiation isn't recognized from there in the Generation project. I don't want a bunch of code in the main project, I want it to remain clean and have all that extra code remain in the Generation Class. Another issue is that it needs to generate the number of these people/sub people passed in so I am declaring it as an array as in Public MyPerson() as Person, then having to instantiate each one.
Any help would be appreciated.