Make a Universal Windows Application that will be used to create and test the use of custom Employee objects. Write a class representing an Employee object, which could be used for record-keeping and payroll. All Employees would have the following properties (choose appropriate data types):
- Name
- Birth Date
- Wage
Make at least 2 other properties that can be used to describe an Employee.
Methods (choose appropriate return types and input parameters):
- Constructor
- ToString
- Hire
- Set the wage to minimum wage: $14.25
- This should not happen if the employee has previously been promoted (i.e. this method should never make the employee's wage lower)
- Promote
- Raise the current wage by 2%
- This should not happen if the employee has been terminated (i.e. when the wage is zero)
- Terminate
- Set the wage to zero
Make at least 1 other method that can be called upon to take an action on/using an Employee.
Make a user interface that will allow users to perform the following actions:
- Make a new Employee object by filling in/selecting various options (enter name, choose birth date, enter wage, etc.)
- Validate the entered information
- Employee name cannot be blank
- Birth date must contain appropriate information
- Wage must be at least the minimum wage ($14.25)
- Interact with the Employee after it has been created
- For example, the user could click a button to promote the employee - in the button click event handler method, call the existing Employee's Promote method.
- Display current information about the created Employee on screen
- Ensure this is updated every time the user modifies the Employee object.
I need to think about...
- How can you organize the interface in order to make it clear and simple for the user?
- Where can you declare your Employee object to ensure proper scope?
- What additional properties and methods can your Employee object have?
- What access modifiers/permissions are appropriate for the properties and methods?
- What would cause an error in an Employee object?
- How can your program make use of error-handling techniques and respond to errors appropriately?