Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. Create the foundations of an employee management system in a company.
  2. Implement the class representing the employee.
  3. Each employee is described by the following properties:
  4. • first name
  5. • last name
  6. • contract
  7.  
  8. The class representing the employee provides operations:
  9. • initiator constructor of the employee with the first and last name of the trainee in the arguments
  10. • method allowing to change the contract assigned to the employee
  11. • method returning the salary of the employee dependent on the signed contract
  12. • an overloaded ToString () method containing a character string consisting of the employee's name, surname and amount
  13.  
  14. Each contract is represented by an object that publicly provides the following operations:
  15. • a method that returns the amount of salary paid for a given contract
  16. • a constructor that allows you to initiate all component fields of the contract
  17. • default constructor
  18.  
  19. Currently, two types of contracts are signed in the company: internship and full-time employment.
  20. The contracts are defined by the following properties:
  21. • Internship: monthly rate (default PLN 1,500)
  22. • Full-time: monthly rate (default PLN 3,600), overtime (default 0)
  23.  
  24. The amount of salary is determined differently for each of these contracts, respectively:
  25. • Intern's salary it is always equal to the monthly rate
  26. • Full-time employee's salary = monthly rate + overtime * (monthly rate / 60)
  27.  
  28. We assume that in the future other types of contracts will appear which differ in the manner of calculating the salary.
  29. The calculation of the salary is the contract class object, which provides a public method that returns the amount of remuneration using the Salary () method.
  30. Therefore, adding a new contract type boils down to implementing only one class, without the need to modify existing classes.
  31.  
  32. Requirements:
  33. • C # language
  34. • Simple graphical interface in WPF - displaying the list of employees along with their salaries, adding, removing employees and editing the contract (application of the MVC / MVP / MVVM template - optional)
  35. • Several simple unit tests
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement