public static void PayPremiumByCheque(ref InsurancePolicy p, Customer customer) { Console.WriteLine("Use Case Changes to \"Pay Premium By Cheque\""); while (true) { Console.WriteLine("Type in \"Confirm\" to confirm that Customer has Paid Premium by Cheque OR \"Cancel\" to return back to editing policy: "); string confirmation = Console.ReadLine(); if (confirmation.ToUpper() == "CONFIRM") { p.Duration.AddPayDate(p); p.AutoState(); break; } else if (confirmation == "CANCEL") { EditPolicy(customer); break; } else { Console.WriteLine("Please key in a valid option"); continue; } } }
public static void payPremiumByCreditCard(InsurancePolicy p, List <Receipt> receiptList) { Console.WriteLine("Use Case Changes to \"Pay Premium By Credit Card\""); p.Duration.AddPayDate(p); receiptList.Add(new Receipt(p)); p.AutoState(); }