//Overloaded Constructor public GreenPlan(/*int carNum, */ GreenType type, string make, string model, string city, string hwy, int msrp) { //CarNum = carNum; Type = type; Make = make; Model = model; CityMpg = city; HwyMpg = hwy; Msrp = msrp; }
private void TypeCars(GreenType type) { Console.Clear(); List <GreenPlan> typeCars = _greenPlanRepo.GetCars(); int carCounts = 1; foreach (GreenPlan car in typeCars) { car.CarNum = carCounts; _greenPlanRepo.GetCars(); if (car.Type == type) { Console.WriteLine($"{car.CarNum} {car.Type},{car.Make}, {car.Model}, {car.CityMpg}/{car.HwyMpg}, Starting MSRP: {car.Msrp}"); carCounts++; } } // Console.ReadKey(); }
private void RandomizeGreenType() { GreenType = (GreenType) new Random().Next(0, 6); }