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++; }