title: How can I improve this block of code?
body: <pre><code>public class OrderProcessor {
  
    public Double calculateTotalPriceWithDiscountCode(Order order,
          char discountCode) {
  
      Double itemTotal = order.getItemTotal();
      Double discountAmount = 0.0;
  
      switch (discountCode) {
      case 'A':
          discountAmount = 0.95 * itemTotal;
          break;
      case 'B':
          discountAmount = 0.15 * itemTotal;
          break;
      }
      return itemTotal - discountAmount;
  }
  </code></pre>
  
  <p>Current implementation in order processor is closed for extension and open for modification for adding new discount codes, how can i improve the design to get rid of this limitation</p>