public class SchoolEmployee
public string Name {get; set;}
protected string EmployeeID {get; set;}
if (value < 30000 || value > 100000){
private int JoinYear{get; set;}
public SchoolEmployee() {}
public SchoolEmployee(string N, string E, int S, int Y) {
Console.WriteLine("Employee's Name: "+ Name);
int tenure = DateTime.Now.Year - JoinYear + 1;
string JobType {get; set;}
public class Teacher: SchoolEmployee, IJob
public string Department{get; set;}
public string JobType {get; set;}
public Teacher(string N, string E, int S, int Y, string D, string J): base (N, E, S, Y) {
public new void PrintName(){
Console.WriteLine("Teacher's Name: "+ Name);
public bool IsAccountingJob(){
if (JobType == "accounting"){
public string CourseName{get; set;}
public string CourseID{get; set;}
public Teacher CourseTeacher {get; set;}
public Course(string N, string I, Teacher T){
public bool HighExperience(){
if (CourseTeacher.Tenure() > 10){
public static void Main()
Teacher teacher1 = new Teacher("liu","A1234", 6000, 2018, "ODT", "accounting");
Course course1 = new Course("C#","S308",teacher1);
Console.WriteLine("Course: " + course1.CourseName);
Console.WriteLine("High Experience: " + course1.HighExperience());
Console.WriteLine("Accounting Status: " + teacher1.IsAccountingJob());
Console.WriteLine("Bonus: " + teacher1.ShowBonus());