示例#1
0
        public void addCone(Cone cone) {
            if (ctCone == 10) { throw new ArgumentException("Order full, cannot order any more cones. "); }

            cones[ctCone] = cone;

            totalPrice += cone.totalCost();

            ctCone++;
        }
        public void addCone(Cone cone)
        {
            if (ctCone == 10) { throw new ArgumentException("Order full, cannot order any more cones. "); }

            cones[ctCone] = cone;

            totalPrice += cone.totalCost();

            ctCone++;
        }