コード例 #1
0
 public SalariedEmployee(String firstName, String middleName, String lastName,
                         Sex gender, DateTime birthday, Haircolor hairColor,
                         String employeeNumber)
     : base(firstName, middleName, lastName, gender, birthday,
            hairColor, employeeNumber)
 {
 }
コード例 #2
0
		protected Employee(String firstName, String middleName, String lastName, 
											Sex gender, DateTime birthday, Haircolor hairColor, 
											String employeeNumber){
			_person = new Person(firstName, middleName, lastName, gender, birthday, 
													hairColor);
			_employeeNumber = employeeNumber;
		}
コード例 #3
0
 public IEmployee GetNewHourlyEmployee(String firstName, String middleName,
                                       String lastName, Sex gender,
                                       DateTime birthday, Haircolor hairColor,
                                       String employee_number)
 {
     return(new HourlyEmployee(firstName, middleName, lastName, gender, birthday,
                               hairColor, employee_number));
 }
コード例 #4
0
		// copy constructor
		public Person(Person person){
			_firstName = person.FirstName;
			_middleName = person.MiddleName;
			_lastName = person.LastName;
			_gender = person.Gender;
			_birthday = person.Birthday;
			_hairColor = person.HairColor;
		}
コード例 #5
0
		//default constructor
		public Person(){
			_firstName = string.Empty;
			_middleName = string.Empty;
			_lastName = string.Empty;
			_gender = Sex.MALE;
			_birthday = DateTime.Now;
			_hairColor = Haircolor.BLONDE;
		}
コード例 #6
0
		public Person(string firstName, string middleName, string lastName, 
										Sex gender, DateTime birthday, Haircolor hairColor){
			_firstName = firstName;
			_middleName = middleName;
			_lastName = lastName;
			_gender = gender;
			_birthday = birthday;
			_hairColor = hairColor;
		}
コード例 #7
0
		private void SetHaircolorRadioButton(Haircolor haircolor){
			if(haircolor == Haircolor.UNKNOWN){
				_unknownRadioButton.Checked = true;
			}
			if(haircolor == Haircolor.BLONDE){
				_blondeRadioButton.Checked = true;
			}
			if(haircolor == Haircolor.BROWN){
				_brownRadioButton.Checked = true;
			}
			if(haircolor == Haircolor.BLACK){
				_blackRadioButton.Checked = true;
			}
		}
コード例 #8
0
		private Haircolor RadioButtonToHaircolorEnum(){
			Haircolor haircolor = Haircolor.UNKNOWN;
			if(_unknownRadioButton.Checked){
			  haircolor = Haircolor.UNKNOWN;
			}
			if(_blondeRadioButton.Checked){
			  haircolor = Haircolor.BLONDE;
			}
			if(_brownRadioButton.Checked){
			  haircolor = Haircolor.BROWN;
			}
			if(_blackRadioButton.Checked){
			  haircolor = Haircolor.BLACK;
			}
			return haircolor;
		}
コード例 #9
0
 public override string ToString() =>
 $"{Gender.ToString()}, Hair: {Hairtype}, Haircolor: {Haircolor.ToString()}, Emotion: {Emotion}, Glasses: {GlassesType}";