Пример #1
0
 public virtual int VisitSalary(Ceo ceo)
 {
     // 10% raise for each year serving the company
     return(ceo.BaseSalary + (ceo.BaseSalary * ceo.Seniority / 10));
 }
Пример #2
0
 public override int VisitSalary(Ceo e)
 {
     // 10% raise for each year serving the company
     return(base.VisitSalary(e) * 2);
 }
Пример #3
0
        public override int Visit(Ceo ceo)
        {
            Console.WriteLine($"Greetings, your excellence!");

            return(0);
        }
Пример #4
0
 public abstract int Visit(Ceo ceo);
Пример #5
0
 public override int Visit(Ceo ceo)
 {
     // 10% raise for each year serving the company
     return(ceo.BaseSalary + (ceo.BaseSalary * ceo.Seniority / 10));
 }