Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

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.

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:

1. Teacher’s Total Salary = Basic Salary + Course Rate x No. of Courses


2. Security Guard’s Total Salary = Basic Salary + Hourly Rate x No. of Duty Hours

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.

Now, implement the client class as per below:

Application: Employee Information System


You have to make a small Employee database program that will be menu driven. The menu should be like:

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.

1. Enter New employee data


2. Display all records
3. Sort by Employee ID and display records
4. Search Employee by ID and display results
5. Compute total Salaries to be paid
6. Compute Salaries for Specific Type of Employees
7. Write all the Data to File
8. Read Data from File
9. Exit

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

You might also like