Advertisement
social1986

Untitled

Feb 16th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. public class Employee
  2. {
  3.     private string name;
  4.     private decimal salary;
  5.     private string position;
  6.     private string department;
  7.     private string email;
  8.     private int age;
  9.  
  10.     public string Name
  11.     {
  12.         get { return this.name; }
  13.         set { this.name = value; }
  14.     }
  15.  
  16.     public decimal Salary
  17.     {
  18.         get { return this.salary; }
  19.         set { this.salary = value; }
  20.     }
  21.  
  22.     public string Position
  23.     {
  24.         get { return this.position; }
  25.         set { this.position = value; }
  26.     }
  27.  
  28.     public string Department
  29.     {
  30.         get { return this.department; }
  31.         set { this.department = value; }
  32.     }
  33.  
  34.     public string Email
  35.     {
  36.         get { return this.email; }
  37.         set { this.email = value; }
  38.     }
  39.  
  40.     public int Age
  41.     {
  42.         get { return this.age; }
  43.         set { this.age = value; }
  44.     }
  45.  
  46.     public Employee()
  47.     {
  48.         this.Age = -1;
  49.         this.Email = "n/a";
  50.     }
  51.  
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement