I have a question I am writing this program for class where all of the output goes into one JOptionPane.showMessageDialog for instance I have the The sub total price displayes, the sales tax displayed, and the Grand total displayed in this I also want to display a message if the persons grand total is < $1000.00 "Thank you for your business" else if it is > $1000.00 " Thank you if you need any help please let us know"
I was trying to do the case statement where it is has case 1: case 2: Can I do an if statement in the switch to where all of this messages will be in the same Message Dialog? I hope this makes sense. thank you in advance for any help
switch (numberBoxes)
{
case 1:
outPut = "Thank you - We hope to see you again!";
break;
case 2:
outPut = "Please visit our website at www.SuperXWarehouse.com";
break;
}
JOptionPane.showMessageDialog(null, "Your order will be shipped in " + numberBoxes + " boxes." + "\n\n\nThe price for " + numberDevices + " Devices is: $ " + twoD.format(ttlPrice) +"\nSales Tax @ 7.95%: $" + twoD.format(salesTax) + "\nTotal Price: $" + twoD.format(grandTotal) + "\n" + outPut);