Choosing a data type begins with the information, not with the code.
A useful question is:
Consider several pieces of soccer information:
| Information | Example value |
|---|---|
| player name | "Jordan" |
| jersey number | 7 |
| goals scored | 3 |
| height in meters | 1.82 |
| available for match | true |
The meaning of each value suggests the kind of representation the program should use.
A player's name should be represented as text:
This does not tell you how the application will be coded yet.
It tells you what kinds of information the model needs to represent.
That type thinking becomes visible in UML class diagrams.