private static void Add() { Vehicle vehicle = new Vehicle(Autobazar.GetNextId()); vehicle.YearOfProduction = InputValidator.GetPositiveNumber("Enter year of production"); vehicle.NumberOfKm = InputValidator.GetPositiveNumber("Enter number of km"); vehicle.VehicleBrand = InputValidator.GetText("Enter brand of vehicle"); vehicle.VehicleType = InputValidator.GetText("Enter type of vehicle"); vehicle.VehicleFuel = InputValidator.GetFuel(); vehicle.Price = InputValidator.GetPositiveDecimal("Enter price"); vehicle.City = InputValidator.GetText("Enter city"); vehicle.NumberOfDoors = InputValidator.GetPositiveNumber("Enter number of doors"); vehicle.IsCrashed = InputValidator.GetBoolen("Enter if vehicle was crashed - Yes/No"); Autobazar.AddVehicle(vehicle); ConsoleWriter.ConsoleHorizontalLine('-'); Console.WriteLine("Vehicle was added."); }