本文整理汇总了C#中Event.calculateTicketPrice方法的典型用法代码示例。如果您正苦于以下问题:C# Event.calculateTicketPrice方法的具体用法?C# Event.calculateTicketPrice怎么用?C# Event.calculateTicketPrice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Event
的用法示例。
在下文中一共展示了Event.calculateTicketPrice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main(string[] args)
{
Event Event1 = new Event();
Event1.GetEventInfo();
Event1.calculateTicketPrice();
Event1.GetConcessionPrice();
Event1.GetDiscountedConcessionPrice();
Event1.GetTotalPrice();
System.Console.WriteLine("Your total ticket cost is " + Event1.TicketPrice);
System.Console.WriteLine("Your total food cost is " + Event1.FoodPriceTotal);
System.Console.WriteLine("Your total ticket cost is " + Event1.TicketPrice);
System.Console.WriteLine("Your total concession cost is " + Event1.concessionPrice);
System.Console.WriteLine("Your total concession cost with the discount is " + Event1.DiscountedConcessionPrice);
System.Console.WriteLine("---------------------------------------------------");
Event Event2 = new Event();
Event2.GetEventInfo();
Event2.calculateTicketPrice();
Event2.GetConcessionPrice();
Event2.GetDiscountedConcessionPrice();
Event2.GetTotalPrice();
System.Console.WriteLine("Your total ticket cost is " + Event2.TicketPrice);
System.Console.WriteLine("Your total concession cost is " + Event2.concessionPrice);
System.Console.WriteLine("Your total concession cost with the discount is " + Event2.DiscountedConcessionPrice);
System.Console.WriteLine("Your total ticket cost is " + Event2.TicketPrice);
System.Console.WriteLine("Your total food cost is " + Event2.FoodPriceTotal);
System.Console.WriteLine("---------------------------------------------------");
Event Event3 = new Event();
Event3.GetEventInfo();
Event3.calculateTicketPrice();
Event3.GetConcessionPrice();
Event3.GetDiscountedConcessionPrice();
Event3.GetTotalPrice();
System.Console.WriteLine("Your total ticket cost is " + Event3.TicketPrice);
System.Console.WriteLine("Your total concession cost is " + Event3.concessionPrice);
System.Console.WriteLine("Your total concession cost with the discount is " + Event3.DiscountedConcessionPrice);
System.Console.WriteLine("Your total ticket cost is " + Event3.TicketPrice);
System.Console.WriteLine("Your total food cost is " + Event3.FoodPriceTotal);
System.Console.WriteLine("---------------------------------------------------");
Event Event4 = new Event();
Event4.GetEventInfo();
Event4.calculateTicketPrice();
Event4.GetConcessionPrice();
Event4.GetDiscountedConcessionPrice();
Event4.GetTotalPrice();
System.Console.WriteLine("Your total ticket cost is " + Event4.TicketPrice);
System.Console.WriteLine("Your total concession cost is " + Event4.concessionPrice);
System.Console.WriteLine("Your total concession cost with the discount is " + Event4.DiscountedConcessionPrice);
System.Console.WriteLine("---------------------------------------------------");
System.Console.WriteLine("Total Event Cost for " + Event1.movieGoer + " is " + Event1.TotalPrice + " .");
System.Console.WriteLine("Total Event Cost for " + Event2.movieGoer + " is " + Event2.TotalPrice + " .");
System.Console.WriteLine("Total Event Cost for " + Event3.movieGoer + " is " + Event3.TotalPrice + " .");
System.Console.WriteLine("Total Event Cost for " + Event4.movieGoer + " is " + Event4.TotalPrice + " .");
System.Console.WriteLine("Grand Total for ALL MOVIEGOERS IS " + (Event1.TotalPrice + Event2.TotalPrice+ Event3.TotalPrice+ Event4.TotalPrice) + " wow!");
System.Console.ReadKey();
}