예제 #1
0
        static void Main(string[] args)
        {
            List <Employee> employeeList = new List <Employee>();
            Menu            menu         = new Menu();
            int             choice       = menu.GetInput();

            while (choice != 3)
            {
                if (choice == 1)
                {
                    GetEmployeeDetail newInput           = new GetEmployeeDetail();
                    Employee          newEmployee        = newInput.TakeInput(); //pascal case for all function
                    Calculation       calculatedEmployee = new Calculation(newEmployee);
                    CalculatedDetails details            = new CalculatedDetails();
                    details = calculatedEmployee.GetCalculatedDetails();
                    newEmployee.AddCalculations(details);
                    employeeList.Add(newEmployee);
                }
                if (choice == 2)
                {
                    foreach (Employee employee in employeeList)
                    {
                        Format1 out1 = new Format1(employee);
                    }
                    Console.WriteLine("");
                }
                menu.PrintMenu();
                choice = menu.GetInput();
            }
        }
예제 #2
0
 public Employee(string firstName, string lastName, int salary, double superRate)
 {
     this.FirstName    = firstName;
     this.LastName     = lastName;
     this.AnnualSalary = salary;
     this.SuperRate    = superRate;
     details           = null;
 }
예제 #3
0
        public CalculatedDetails GetCalculatedDetails()
        {
            CalculatedDetails details = new CalculatedDetails(payPeriod, grossIncome, incomeTax, netIncome, super);

            return(details);
        }
예제 #4
0
 public void AddCalculations(CalculatedDetails calculations)
 {
     details = calculations;
 }