i am trying to do this program. it compiles and everything but the numbers are not coming out right. any help would be greatly appreciated.
thank you
heres the problem.
Write a program that computes the tax and tip on a restaurant
bill. The program should use JOptionPane to ask the user to enter the
charge for the meal. The tax should be 6.75 percent of the meal
charge. The tip should be 15 percent of the total after adding the
tax. Display the meal charge, tax amount, tip amount, and total bill
on the screen.
import javax.swing.JOptionPane;
public class Bill
{
public static void main(String[] args)
{
double mealPurchase = 0;
mealPurchase = Double.parseDouble(JOptionPane.showInputDialog(nul l, " Enter meal total: "));
double mealTax = 0.0675;
double mealTip = 0.15;
double mealSubtotal = mealPurchase * mealTax;
double plusTip = mealPurchase * mealTip + mealSubtotal;
double mealTotal = plusTip + mealSubtotal;
JOptionPane.showMessageDialog(null, " Meal charge: " + mealPurchase +
"\nTax Amount: " + mealSubtotal +
"\nTip Amount: " + plusTip +
"\nMeal Total: " + mealTotal );
}
}