Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Faculty of Computing-WISH
Object Oriented Programming
Fall-18
Assignment 3
Q1.
A company pays its employees on a weekly basis. The employees are of four
types: Salaried employees are paid according to the number of hours worked,
and the hourly rate. The company wants to write an application that performs its
payroll calculations.
1. What you are required to do is create an Interface Payable having method
getPayableAmount().that returns a double amount that must be paid for an
object of any class that implements the interface.
2. Now create a class Employee first name, last name, designation, hours
worked, per hour salary.
a) Provide getter setter and constructors for these data members.
b) Provide a toString() method to print details of employee.
c) This class implements the payable interface method
getPayableAmount() which calculates the salary of the employee.