public static void CheckOut() { int userSelection = Validate.ParseIntFromString("How are you paying for your items today?\n1.Credit Card\n2.Cash\n3.PayPal\n4.Check\n", 1, 4); switch (userSelection) { case 1: // credit card method CreditPayment payment = new CreditPayment(); payment.GetPayment(); receipt.PaymentType = payment; break; case 2: // cash method CashPayment cash = new CashPayment(); cash.GetPayment(); if(cash.Input < receipt.Total) { Console.WriteLine("Insufficient funds!"); CheckOut(); break; } cash.Change = cash.Input - receipt.Total; receipt.PaymentType = cash; break; case 3: // paypal method PayPalPayment payPal = new PayPalPayment(); payPal.GetPayment(); receipt.PaymentType = payPal; break; case 4: //check method CheckPayment check = new CheckPayment(); check.GetPayment(); receipt.PaymentType = check; break; default: Validate.GetInput("Please select a valid payment method"); break; } }