I know that I don't have this just right, but I'm not sure how to get it just right. I've tried several different things and have been unsuccessful in all of them. Any tips?
Also, by using
DisplayIntroMessage()
near the end, will that bring up the method to begin the order placing process again?
public void DoTheMath()
{
//declare & assign value to totals
double totalAmountDue = quant * productValue * TAX_RATE;
double grandTotal;
//determine whether or not 5% discount is applicable
if (totalAmountDue >= 100)
grandTotal = totalAmountDue * .95;
else
{
grandTotal = totalAmountDue;
}
//give total to user
Console.WriteLine("Your order totals $" + grandTotal);
//determine whether or not user desires another order and follow through
char anotherOrder;
Console.WriteLine("Would you like another order? Enter yes or no");
anotherOrder = Convert.ToChar(Console.ReadLine() );
//if user enters an invalid choice...
if (anotherOrder != yes || anotherOrder != no)
do
{
Console.WriteLine("Please enter a valid choice.");
Console.WriteLine("It must be in the form of \"yes\" or \"no\".");
anotherOrder = Convert.ToChar(Console.ReadLine() );
} while (anotherOrder != yes || anotherOrder != no);
//if the user says "no"...
if (anotherOrder = no)
Console.WriteLine("Thank you for your order. We hope you enjoy it!");
//if the user says "yes"...
if (anotherOrder = yes)
DisplayIntroMessage();
}