applied GoF's State Pattern to replace type code (moved Price
calculation in Price)