예제 #1
0
from hr import PayrollSystem, HourlyPolicy
from productivity import ProductivitySystem
from employees import EmployeeDatabase

productivity_system = ProductivitySystem()
payroll_system = PayrollSystem()
employee_database = EmployeeDatabase()

employees = employee_database.employees()

manager = employees[0]
manager.payroll = HourlyPolicy(55)

productivity_system.track(employees, 40)
payroll_system.calculate_payroll(employees)
예제 #2
0
from hr import PayrollSystem
from productivity import ProductivitySystem
from employees import EmployeeDatabase

productivity_system = ProductivitySystem()
payroll_system = PayrollSystem()
employee_database = EmployeeDatabase()
employees = employee_database.employees
productivity_system.track(employees, 40)
payroll_system.calculate_payroll(employees)
예제 #3
0
import json

# from hr import PayrollSystem
# from productivity import ProductivitySystem
from employees import EmployeeDatabase

def print_dict(d):
    print(json.dumps(d, indent=2))

# productivity_system = ProductivitySystem()
# payroll_system = PayrollSystem()
# employee_database = EmployeeDatabase()
# employees = employee_database.employees

# productivity_system.track(employees, 40)
# payroll_system.calculate_payroll(employees)

for employee in EmployeeDatabase().employees:
    print_dict(employee.to_dict())
예제 #4
0
 def main():
     for employee in EmployeeDatabase().employees:
         Main.print_dict(employee.to_dict())
예제 #5
0
# from employees import EmployeeDatabase

# productivity_system = ProductivitySystem()
# payroll_system = PayrollSystem()
# employee_database = EmployeeDatabase()
# employees = employee_database.employees
# productivity_system.track(employees, 40)
# payroll_system.calculate_payroll(employees)

from hr import PayrollSystem, HourlyPolicy
from productivity import ProductivitySystem
from employees import EmployeeDatabase

productivity_system = ProductivitySystem()
payroll_system = PayrollSystem()
employee_database = EmployeeDatabase()
employees = employee_database.employees
manager = employees[0]
manager.payroll = HourlyPolicy(55)

productivity_system.track(employees, 40)
payroll_system.calculate_payroll(employees)

import json
from employees import EmployeeDatabase


def print_dict(d):
    print(json.dumps(d, indent=2))