Professional Documents
Culture Documents
Assignment 02
Assignment 02
Using the classes (i.e. Employee, Academic, Teacher, NonAcademic and SecurityGuard) implement your code
in java as required.
In the Employee class add a computeSalary() method. Remember the salary attribute in the Employee class
stores the basic salary of an employee. However, the total salary calculations depend on the type of employee
itself. The salaries are calculated as per below:
You may need to override the methods wherever required. The way how you compute salary completely
depends on your approach and no restrictions are applied for this assignment. Also, add constructors (including
copy constructor), getters, setters, toString and equals method in all your classes. You may also add any other
method as you may require.
Page 1
International Islamic University Islamabad
Course Advanced Computer Programming, SE 241
Instructor Muhammad Imran
Assignment 02
Due Date Tuesday, March 24th, 2020
Grade 10 Marks
Note No late submission is accepted under any circumstances.
Important notes:
• This is an individual assignment. Students are expected not to share answers or ideas.
• The code should follow java sun formatting conventions, with usage of CaMel notation as must for
variable and method names.
• All data members in every class should be private. You have to provide getters and setter methods for all
the data members. Provide default constructor and other constructors as required.
• An employee’s object must be created with employee id, name and designation. Every employee class
should have a function called toString(). This function should concatenate all data members in a string
separated by a comma and return this string.
• The user should be able to enter data of one employee at a time and upto a maximum of ten records. (Hint,
make an Array of Objects of class Employee of Max Size 10. If array is full the program should give an
show the error message).
• When user presses 2, then program should display all data (Hint: Should call toString function of every
member of array of objects).
• For sorting records in the array the program should use bubble sort. For search option program should
match Employee ID and should then display the rest of data of student. If no data matches then program
should give error message.
• Plagiarism in the assignment would be dealt strictly; also copying from other students would penalize both
the students.
• You should zip your eclipse project and submit via email on se241acp@gmail.com
Page 2