/// <summary>
        /// Gets an integer from the user about the number of units they want to sell
        /// Sets the backorder flag if they sell more than the current inventory
        /// </summary>
        /// <param name="product"></param>
        /// <returns></returns>
        public int DisplayGetNumberOfUnitsToSell(out Product.ProductType productType)
        {
            //
            // initialize variable
            //
            int productAmount = 0;

            //
            // set up the console
            //
            ConsoleUtil.HeaderText = "Unit Selling";
            ConsoleUtil.DisplayReset();


            //
            // get the product type
            //
            if (!ConsoleValidator.GetEnumValueFromUser <Product.ProductType>(MAXIMUM_ATTEMPTS, "What type of vehicle do you want to sell?", out productType))
            {
                ConsoleUtil.DisplayMessage("Maximum attempts exceeded, returning to main menu.");
            }

            //
            // validate the input
            //
            if (!ConsoleValidator.TryGetIntegerFromUser(MINIMUM_BUYSELL_AMOUNT, MAXIMUM_BUYSELL_AMOUNT, MAXIMUM_ATTEMPTS, $"{productType.ToString()}s", out productAmount))
            {
                ConsoleUtil.DisplayMessage("Maximum attempts exceeded, returning to main menu.");
            }

            DisplayContinuePrompt();
            return(productAmount);
        }
        /// <summary>
        /// Edits the salesperson's account information
        /// </summary>
        /// <param name="salesperson"></param>
        public void DisplayEditAccountInfo(Salesperson salesperson)
        {
            bool   validResponse = false;
            int    userAge       = 0;
            string userResponse;

            Salesperson.Ranks rank;
            //
            // set up the console
            //
            ConsoleUtil.HeaderText = "Account Editing";
            ConsoleUtil.DisplayReset();

            //
            // get new account info
            //
            ConsoleUtil.DisplayMessage("Just press enter if you wish to skip the current field");
            ConsoleUtil.DisplayMessage("");

            ConsoleUtil.DisplayMessage($"First Name: {salesperson.FirstName}");

            userResponse = Console.ReadLine();
            if (userResponse != "")
            {
                salesperson.FirstName = userResponse;
            }

            Console.WriteLine("");

            ConsoleUtil.DisplayMessage($"Last Name: {salesperson.LastName}");

            userResponse = Console.ReadLine();
            if (userResponse != "")
            {
                salesperson.LastName = userResponse;
            }

            Console.WriteLine("");


            ConsoleUtil.DisplayMessage($"Age: {salesperson.Age}");

            validResponse = ConsoleValidator.TryGetIntegerFromUser(10, 90, MAXIMUM_ATTEMPTS, "years old", out userAge, true);
            if (validResponse)
            {
                salesperson.Age = userAge;
            }

            ConsoleUtil.DisplayMessage($"Account ID: {salesperson.AccountID}");

            if (userResponse != "")
            {
                salesperson.AccountID = userResponse;
            }
            Console.WriteLine("");


            ConsoleUtil.DisplayMessage($"Rank: {salesperson.Rank}");

            if (ConsoleValidator.GetEnumValueFromUser <Salesperson.Ranks>(MAXIMUM_ATTEMPTS, "Rank:", out rank, true))
            {
                salesperson.Rank = rank;
            }

            DisplayContinuePrompt();
        }
        /// <summary>
        /// setup the new salesperson object with the initial data
        /// Note: To maintain the pattern of only the Controller changing the data this method should
        ///       return a Salesperson object with the initial data to the controller. For simplicity in
        ///       this demo, the ConsoleView object is allowed to access the Salesperson object's properties.
        /// </summary>
        public Salesperson DisplaySetupAccount()
        {
            //
            // initialize variables
            //
            bool validResponse;
            int  userAge;
            int  productAmount;

            Product.ProductType productType;
            Salesperson         salesperson = new Salesperson();

            //
            // set up the console
            //
            ConsoleUtil.HeaderText = "Account Setup";
            ConsoleUtil.DisplayReset();

            //
            // get new account info
            //
            ConsoleUtil.DisplayPromptMessage("First name: ");
            salesperson.FirstName = Console.ReadLine();
            Console.WriteLine("");

            ConsoleUtil.DisplayPromptMessage("Last name: ");
            salesperson.LastName = Console.ReadLine();
            Console.WriteLine("");

            ConsoleUtil.DisplayMessage("Age");
            validResponse = ConsoleValidator.TryGetIntegerFromUser(10, 90, MAXIMUM_ATTEMPTS, "years old", out userAge);
            if (validResponse)
            {
                salesperson.Age = userAge;
            }

            ConsoleUtil.DisplayPromptMessage("Account ID: ");
            salesperson.AccountID = Console.ReadLine();
            Console.WriteLine("");

            //
            // validate user input
            //
            ConsoleUtil.DisplayMessage("Setting up inventory..");
            ConsoleUtil.DisplayMessage("");
            if (!ConsoleValidator.GetEnumValueFromUser <Product.ProductType>(MAXIMUM_ATTEMPTS, "Body Style:", out productType))
            {
                ConsoleUtil.DisplayMessage("Maximum attempts exceeded, returning to main menu.");
            }


            if (!ConsoleValidator.TryGetIntegerFromUser(MINIMUM_BUYSELL_AMOUNT, MAXIMUM_BUYSELL_AMOUNT, MAXIMUM_ATTEMPTS, $"{productType.ToString()}s", out productAmount))
            {
                ConsoleUtil.DisplayMessage("Max attempts exceeded, returning to main menu with default value of 0 vehicles.");
            }

            //
            // set salesman product object
            //
            salesperson.CurrentStock[productType].NumberOfUnits = productAmount;

            salesperson.Rank = Salesperson.Ranks.Beginner;

            DisplayContinuePrompt();
            return(salesperson);
        }