Esempio n. 1
0
        static void Main(string[] args)
        {
            CEmployee cEmployee = new CEmployee("cristian", "enginner", 19, 1000);

            Console.WriteLine(cEmployee);
            Console.WriteLine(CTaxesDepartment.CI(cEmployee));
            CTaxesDepartment.PI(cEmployee);
        }
        public static void PI(CEmployee cEmployee)
        {
            double imp = CI(cEmployee);

            Console.WriteLine("Pay {0} in {1}", imp, cEmployee.Name);
        }
 //We have created a specialized class for other reponsability
 //Now this class has just one responsability
 public static double CI(CEmployee cEmployee)
 {
     return(cEmployee.Salary * 0.35);
 }