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();
        }

Recommended Answers

All 4 Replies

Just thought of this: If the user opts for a second, third, etc. order, what is the easiest way to store the total from their prior order(s) to add them all together once they're finished?

I can honestly say, that I have never been unsure in my life.

I read your post like twice, to find what the question is.
What do you need help with exactly? and what are you facing a problem with?
and if you show us the actual method of DisplayIntroMessage(); it would also help.

So again, what is the question.

commented: You're a liar. -2

Oh man, I'm really sorry. Not only did I only post babbling instead of addressing my issue, I don't even have all of the pertinent code. To make it worse still is the fact that it is in the wrong language forum. :( I soo need sleep. *shakes head at self* I'll just go over and post this in the C# category now....

lol, its aight =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.