title: Java Compilation Error- Type mismatch: cannot convert from String to int
body: <p>The question is Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation. For example, typical output might be, You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85. Save the program as EggsTwo.java.</p>
  
  <p>This is what I have: </p>
  
  <pre><code>import javax.swing.JOptionPane;
  public class EggsTwo
  {
      public static void main(String[] args)
      {
          int eggs, dozen, individual;
          double price;
          final double priceOfDozen = 3.25;
          final double priceOfIndividual = 0.45;
  
          eggs = JOptionPane.showInputDialog(null, "Enter the number of eggs in the order.", "Eggs 
          Dialog 1", JOptionPane.INFORMATION_MESSAGE);
          dozen = eggs / 12; 
          individual = eggs % 12;
          price = (dozen * priceOfDozen) + (individual * priceOfIndividual);
          JOptionPane.showMessageDialog(null, "You ordered " + eggs + " eggs. That's " + dozen + " 
          dozen and " + individual + " loose eggs at 45 cents each for a total of $" + price + ".");
      }
  }
  </code></pre>