Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started