if-else vs switch vs enum 처리 속도 비교
#1. if-else 샘플 코드배송방법과 수하물의 무게에 따라 요금을 계산하는 아래와 같은 코드를 샘플로 작성합니다.public static double calculateShippingCost(String shippingType, double weight) { if (shippingType.equals("STANDARD")) { return weight * 5.0; } else if (shippingType.equals("EXPRESS")) { return weight * 10.0; } else if (shippingType.equals("SAME_DAY")) { return weight * 20.0; } else if (shippingType...