public static void Main(string[] args)
Console.Write("Select a starting type: ");
if (CheckValidInput(out iOption) && iOption != -1)
BuildCustomOrder("Sedan", ref sQuery);
DisplayBuild(ref sQuery);
BuildCustomOrder("SUV", ref sQuery);
DisplayBuild(ref sQuery);
BuildCustomOrder("Truck", ref sQuery);
DisplayBuild(ref sQuery);
Console.WriteLine("\nThat is not a valid option,press any key to try again...");
Console.WriteLine("\nPress any key to exit...");
static bool CheckValidInput(out int _iOption)
return int.TryParse(Console.ReadLine(),out _iOption);
static string GetColour()
Console.WriteLine("What colour sahoukld the BMW be?: ");
return Console.ReadLine();
public static void AddLeatherSeats(ref string s)
Console.Write("Would you like to add leather seats to your BMW? (Y/N): ");
if (Console.ReadLine().ToUpper() == "Y")
s += " with added leather seats.";
s += " without added leather seats.";
public static void BuildCustomOrder(string _sType, ref string _sQuery)
string sColour = GetColour();
Console.WriteLine("You have selected " + _sType + " That is " + sColour);
AddLeatherSeats(ref _sQuery);
public static void DisplayBuild(ref string sBuild)
Console.WriteLine("\n---------------------------THANK YOU-----------------------------");
Console.WriteLine("We will contact you soon to discuss the price and payment options.\nPress any key to continue....");
public static void DisplayTypes()
Console.WriteLine("----------------------Welcome to the BMW Dealership!----------------------");
Console.WriteLine("Please provide us with some details regarding the BMW you're interested in.\n");
Console.WriteLine("----------------------------------TYPES-----------------------------------");
Console.WriteLine("1) Sedan");
Console.WriteLine("2) SUV");
Console.WriteLine("3) Truck");
Console.WriteLine("-1) Cancel build and close system\n");