Question: 3. Explain both overloading and overriding, and provide an example for each. a. Declare a class called employee having employee_id and employee_name as members. b.

3. Explain both overloading and overriding, and provide an example for each.

a. Declare a class called employee having employee_id and employee_name as members. b. Extend class employee to have a subclass called salary having designation and monthly) salary as members. c. Define the following: i. Required constructor. ii. A method to find and display all details of employees drawing a salary more than 20,000/-. iii. Method main for creating an array for storing these details given as command line arguments and showing usage methods.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!