June 2018
Intermediate to advanced
310 pages
6h 32m
English
Going back to our strategy game, we have a new concept: a squad. A squad consists of zero or more infantry units. This would be a good example of a somewhat complex data structure.
Here are the interfaces and classes we have:
interface InfantryUnitclass Rifleman : InfantryUnitclass Sniper : InfantryUnit
How would you implement that? We'll see it in the next section.
Read now
Unlock full access