public double GetConstructingTime(GearBoxType gearBox) { gearBox.GetReadyTime = Deflection.Do(gearBox.GetReadyTime, gearBox.GetReadyTimeDeflection); gearBox.ConstructingTime = Deflection.Do(gearBox.ConstructingTime, gearBox.ConstructingTimeDeflection); gearBox.FinishingTime = Deflection.Do(gearBox.FinishingTime, gearBox.FinishingTimeDeflection); double constructingTime = gearBox.GetReadyTime + gearBox.ConstructingTime + gearBox.FinishingTime; PrintConstructingTime(gearBox.GetReadyTime, gearBox.ConstructingTime, gearBox.FinishingTime); return(constructingTime); }
public Gearbox GenerateGearbox(GearBoxType gearBoxType, int numberOfGears) { var gearbox = new Gearbox() { GearBoxType = gearBoxType, NumberOfGears = numberOfGears, CreatedOn = DateTime.UtcNow }; return(gearbox); }
public override string ToString() { return( "Trainee's name: " + FirstName + " " + LastName + "\n" + "Gender: " + Gender.ToString() + "\n" + "Trainee's ID: " + ID.ToString() + "\n" + "Vehicle type: " + CarType.ToString() + "\n" + "Transmission type: " + GearBoxType.ToString() + "\n" + "Number of lessons taken: " + NumberOfLessons.ToString() + "\n" + "Address: " + Address.ToString() + "\n" + "Phone: " + Phone); }
public Trainee(string ID, string FirstName, string LastName, DateTime birthDate, Gender Gender, string PhoneNumber, string MailAddress, string Address, Vehicle Vehicle, GearBoxType gearBoxType, string DrivingSchoolName, string TeacherName, int NumOfDrivingLessons, bool OnlyMyGender = false) { this.ID = ID; this.FirstName = FirstName; this.LastName = LastName; this.birthDate = birthDate; this.Gender = Gender; this.PhoneNumber = PhoneNumber; this.MailAddress = MailAddress; this.Address = Address; this.Vehicle = Vehicle; this.GearBoxType = gearBoxType; this.DrivingSchoolName = DrivingSchoolName; this.TeacherName = TeacherName; this.NumOfDrivingLessons = NumOfDrivingLessons; this.OnlyMyGender = OnlyMyGender; }
public Tester(string ID, string FirstName, string LastName, DateTime birthDate, Gender Gender, string PhoneNumber, string MailAddress, string Address, int Experience, int MaxTestsInWeek, Vehicle Vehicle, GearBoxType gearBoxType, SortedSet <TimePeriod> WorkHours, int MaxDistanceInMeters) { this.ID = ID; this.FirstName = FirstName; this.LastName = LastName; this.BirthDate = birthDate; this.Gender = Gender; this.PhoneNumber = PhoneNumber; this.MailAddress = MailAddress; this.Address = Address; this.ExperiencedSince = DateTime.Now.AddYears(-Experience); this.MaxTestsInWeek = MaxTestsInWeek; this.Vehicle = Vehicle; this.GearBoxType = gearBoxType; this.WorkHours = WorkHours; this.MaxDistanceInMeters = MaxDistanceInMeters; }