Develop a program using object-oriented programming principles. Requirements (a) (4 Marks) Create a base class named Employee with the…
Develop a program using object-oriented programming principles.
Requirements
(a) (4 Marks) Create a base class named Employee with the private/protected data members Employee ID, Employee Name, and Basic Salary. In addition, this class should include a constructor to initialize the data members and a method to display employee information.
(b) (5 Marks) Create a derived class named PermanentEmployee that inherits from Employee. It should have methods to calculate a 20% allowance based on the basic salary, to calculate the total salary, and to display the total salary along with the employee information.
(c) (4 Marks) In the main() method:
(i) Create objects for three PermanentEmployee.
(ii) Display the details and total salary of each employee.
(iii) Display the employee with the highest total salary.
From the ICB Securities Trading Company Assistant Programmer July 2026 – Written (DU) exam, question 2 of 3.
More from this paper
- Previous: A file student.txt contains records in the format: StudentID Name Marks1 Marks2 Marks3 Marks4 Write a program that: (a)(3 Marks)…
- Next: (15 Marks) A bank introduces a Digital Gold Banking System that allows customers to maintain both conventional bank accounts and digital…
- All questions in ICB Securities Trading Company Assistant Programmer July 2026 – Written (DU)