/// <summary> /// Method that execute the aplication logic for calculating the payment. /// </summary> /// <param name="formantedData">The formated data that includes the informatión abuto the employee and the worked time.</param> /// <returns></returns> public PaymentModel Execute(string formantedData) { IEmployee employee = _employeeFactory.Create(formantedData); ISchedule schedule = _scheduleFactory.Create(); float payment = schedule.CalculatePayment(employee); return(new PaymentModel(employee.Name, payment)); }