Ejemplo n.º 1
0
        private static string GetTypeDescription(MilkshakeType milkshakeType)
        {
            switch (milkshakeType)
            {
            case MilkshakeType.Small:
                return("Small");

            case MilkshakeType.Medium:
                return("Medium");

            case MilkshakeType.Big:
                return("Big");

            default:
                return("Unknown");
            }
        }
Ejemplo n.º 2
0
        private void SetCost(MilkshakeType milkshakeType)
        {
            switch (milkshakeType)
            {
            case MilkshakeType.Small:
                m_cost = 50;
                break;

            case MilkshakeType.Medium:
                m_cost = 60;
                break;

            case MilkshakeType.Big:
                m_cost = 80;
                break;
            }
        }
Ejemplo n.º 3
0
 public Milkshake(MilkshakeType milkshakeType)
     : base(GetTypeDescription(milkshakeType) + " Milkshake")
 {
     SetCost(milkshakeType);
 }