Question: Question No : 2 2 A company maintains a database that has the details of all the employees. There are two levels of employees where
Question No :
A company maintains a database that has the details of all the employees. There are two levels of employees where Level is the top management having a salary of more than and Level is the staff who are getting a salary less than
Create classes as below:
class Employee Parent Class
parameters: id salary
Method: displayEmp display employee id and salary details
class EmpLevel child class of Employee
parameters: Inherit from the parent class
Method: findEmpLevel print whether the employee belongs to Level l or Level
Create an object for the EmpLevel class and call displayEmp and findEmplevel methods.
Input format :
The input should contain only the employee id integer and salary float of the employee separated by space.
Output format :
The program output must display the employee id salary, and level of the employee one below the other in the same order.
Sample test cases :
Marks : Negative Marks :
Question No:
Sample test cases :
tableInput :Output :
Input :
Output :
Level
Code Size : kb
Note:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
