title: Creating trip cost calulator
body: <p>I am working on an assignment for school and I have a basic program already that calculates the total cost of a trip by asking the total mileage, average mpg of car, and cost per gallon of gas.  This works great but I also need to add a few more items and I am unsure of how to do so.  First I need to include a menu of some sort giving the option to either calculate the trip cost or exit the program.  Next I need to incorporate somewhere in the program a bit asking if the user wants an oil change or not and then based on the answer adding this to the total.</p>
  
  <pre><code>import java.util.Scanner;
  public class GasCalculator {
  
      public static void main (String args[])
      {
          Scanner scan = new Scanner(System.in);
  
          System.out.println("How many miles do you plan to travel?");
          int miles = scan.nextInt();
          System.out.println("So you will drive " + miles +" miles.");
  
          System.out.println("What is the price of gas?");
          double gas = scan.nextDouble();
          System.out.println("Ok, so gas costs $" + gas +" per gallon.");
  
          System.out.println("What is the average MPG of your car? Use the nearest whole number.");
          int mpg = scan.nextInt();
          System.out.println("So, you get " + mpg +" miles per gallon.");
  
          System.out.println("Would you like an oil change? Enter Y or N");
  
  
          double cost = (miles / mpg * gas + oil);
  
          System.out.println("Below is your total cost");
          System.out.println(String.format("Your trip will cost $" + cost + "."));
  
      }
  }
  </code></pre>
  
  <p>As you can see I added a little bit asking if they want an oil change. My vision of doing it would be to create a variable for either the y or n answer and then an if else statement based on whether y or n. If y it will add 39.99 to a new variable "oil". If n it will make the variable 0. Oil has been incorporated into the final equation regardless of it's value for ease.</p>
  
  <p>I am not looking for anyone to do my assignment for me. I guess I am looking to see what this would look like or if anyone has any input as far as how I should tackle this. Thank you for any help you can provide!</p>