예제 #1
0
        public void ShowOutput()
        {
            Console.WriteLine("Your total amount is: ${0}", t.CalculateTotalAmount());
            Console.WriteLine("Your tip amount is: ${0}", t.CalculateTip());
            Console.WriteLine("The tax amount is: ${0}", t.CalculateTaxAmount());

            WriteTip gratuity = new WriteTip(@"C:\SCCC 2014-2015 WD Files\ITC110\Assignment9\writegratuity.txt");

            gratuity.AddToFile("The total amount of the meal is: " + t.MealAmount.ToString());
            gratuity.AddToFile("The recommended tip amount is: " + t.CalculateTip().ToString());
            gratuity.AddToFile("The grand total is: " + t.CalculateTotalAmount().ToString());
            gratuity.CloseFile();
        }