Historical syllabus topic · This subject is outside the current GATE syllabus.
It is desired to design an object-oriented employee record system for a company. Each employee has a name, unique id, and salary. Employees belong to different categories and their salary is determined by their category. The functions get name, getId and compute salary are required. Given the class hierarchy below, possible locations for these functions are:
-
getId is implemented in the superclass
-
getId is implemented in the subclass
-
getName is an abstract function in the superclass
-
getName is implemented in superclass
-
getName is implemented in subclass
-
getSalary is an abstract function in the superclass
-
getSalary is implemented in the superclass
-
getSalary is implemented in the subclass


Choose the best design
View answer
Answer: A
Worked explanation not available yet.
Free practice · Your answers on this page are not saved.
