static void Main(string[] args) { int ch; GSM gsm = new GSM(); do { Console.WriteLine("1.Add Call"); Console.WriteLine("2.Delete Call"); Console.WriteLine("3.Delete all Calls"); Console.WriteLine("4.Total Price"); Console.WriteLine("5.Exit"); ch = Convert.ToInt32(Console.ReadLine()); switch (ch) { case 1: gsm.AddCalls(); break; case 2: Console.WriteLine("Enter Date:(eg:21-08-2020)"); string date = Console.ReadLine(); Console.WriteLine("Enter StartTime:(eg:17:08)"); string time = Console.ReadLine(); gsm.DeleteCalls(date, time); break; case 3: gsm.DeleteAllCalls(); break; case 4: Console.WriteLine("Enter price per second:"); double price = Convert.ToDouble(Console.ReadLine()); gsm.TotCost(price); break; } }while(ch != 5); }
static void Main(string[] args) { GSM.nokiaN95 = new GSM( "N95", "Nokia", "Demo User", 70f, new Battery("BL-5F", 192f, 2.5f, BatteryType.Li_Ion), new Screen(2.8f, "TFT, 16M") ); GSM.displayNokiaN95(); }