[Replace type code with subclasses] initial code
[Replace type code with subclasses] self encapsulate field and static factory
[Replace type code with subclasses] create subclasses
[Replace type code with subclasses] remove type which stores the type code
[Replace type code with subclasses] switch case instead of ifs