Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Mankind11b
- {
- public class Worker : Human
- {
- private double weekSalary;
- private int workingHours;
- public double WeekSalary
- {
- get { return weekSalary; }
- set {
- if (!(value > 10))
- {
- throw new ArgumentException("Expected value mismatch! Argument: weekSalary");
- }
- weekSalary = value;
- }
- }
- public int WirkingHours
- {
- get { return workingHours; }
- set {
- if (!(value >= 1 && value <= 12))
- {
- throw new ArgumentException("Expected value mismatch! Argument: workHoursPerDay");
- }
- workingHours = value;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment