Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create the foundations of an employee management system in a company.
- Implement the class representing the employee.
- Each employee is described by the following properties:
- • first name
- • last name
- • contract
- The class representing the employee provides operations:
- • initiator constructor of the employee with the first and last name of the trainee in the arguments
- • method allowing to change the contract assigned to the employee
- • method returning the salary of the employee dependent on the signed contract
- • an overloaded ToString () method containing a character string consisting of the employee's name, surname and amount
- Each contract is represented by an object that publicly provides the following operations:
- • a method that returns the amount of salary paid for a given contract
- • a constructor that allows you to initiate all component fields of the contract
- • default constructor
- Currently, two types of contracts are signed in the company: internship and full-time employment.
- The contracts are defined by the following properties:
- • Internship: monthly rate (default PLN 1,500)
- • Full-time: monthly rate (default PLN 3,600), overtime (default 0)
- The amount of salary is determined differently for each of these contracts, respectively:
- • Intern's salary it is always equal to the monthly rate
- • Full-time employee's salary = monthly rate + overtime * (monthly rate / 60)
- We assume that in the future other types of contracts will appear which differ in the manner of calculating the salary.
- 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.
- Therefore, adding a new contract type boils down to implementing only one class, without the need to modify existing classes.
- Requirements:
- • C # language
- • 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)
- • Several simple unit tests
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement