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 to get Name, getld and compute salary are required. Given the
class hierarchy below, possible locations for these functions are:
i).getld is implemented in the superclass
ii).getld is implemented in the subclass
ii).getName is an abstract function in the superclass
iv).getName is implemented in the superclass
v).getName is implemented in the subclass
vi).getSalary is an abstract function in the superclass
vii).getSalary is implemented in the superclass
viil).getSalary is implemented in the subclass
Employee
Manager
Engineer
Secretary
choose a best design
Answers
Answered by
1
Answer:
the answer is that it is physics yes or no on the basis of which subject shall I answer.
Explanation:
You can tell me.
Answered by
0
Explanation:
The question is related to object oriented programming languages. In OOP. there are classes which contains ready to use objects.
In object-oriented programming, a class is a set of objects, data structures and then the variables of each type are created in it. A class can also have some functions or methods. The keyword class is used to define a class
Now for the given scenario the correct option would be getld is implemented in the superclass, where the superclass will have all the employee id's and names as well. These we can make sub classes of employee details, salaries, experience etc
Similar questions
English,
1 month ago
Chemistry,
1 month ago
English,
1 month ago
Social Sciences,
4 months ago
Math,
4 months ago
Math,
10 months ago
CBSE BOARD XII,
10 months ago
Math,
10 months ago