Exemplo n.º 1
0
        // public SalaryDetails StartGettingSalaryInfo()
        // {
        //     // var name = _iio.AskQuestion("Please input your name: ");
        //     // var surname = _iio.AskQuestion("Please input your surname: ");
        //     var annualSalary = _iio.AskSalary("Please enter your salary: ");
        //     var super = _iio.AskSuper("Please enter your super rate: ");
        //     // var startDate = _iio.AskQuestion("Please enter your start date in format eg 1 March: ");
        //     // var endDate = _iio.AskQuestion("Please enter your end date in format eg 31 March: ");
        //     return new SalaryDetails(annualSalary, super);
        //    // var payslipCalculator = new PayslipCalculator(salaryDetails);
        //    // var employeeDetails = new EmployeeDetails(name, surname);
        //     //var timeConverter = new TimeConverter(startDate, endDate);
        //    // PrintDetails(employeeDetails, timeConverter, payslipCalculator);
        // }

        public void StartGettingSalaryInfo()
        {
            var name              = _iio.AskQuestion("Please input your name: ");
            var surname           = _iio.AskQuestion("Please input your surname: ");
            var annualSalary      = _iio.AskSalary("Please enter your salary: ");
            var super             = _iio.AskSuper("Please enter your super rate: ");
            var startDate         = _iio.AskQuestion("Please enter your start date in format eg 1 March: ");
            var endDate           = _iio.AskQuestion("Please enter your end date in format eg 31 March: ");
            var salaryDetails     = new SalaryDetails(annualSalary, super);
            var payslipCalculator = new PayslipCalculator(salaryDetails);

            PrintDetails(name, surname, startDate, endDate, payslipCalculator);
        }
Exemplo n.º 2
0
 public PayslipCalculator(SalaryDetails salaryDetails)
 {
     SalaryDetails = salaryDetails;
 }