0% found this document useful (0 votes)
7 views

Assignment 3

DSA se it experiment 3 code
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Assignment 3

DSA se it experiment 3 code
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment No.

3
Title: Inheritance
Aim: Design and develop inheritance for a given case study, identify objects and relationships and implement
inheritance wherever applicable. Employee class with Emp_name, Emp_id, Address, Mail_id, and Mobile_no as
members. Inherit the classes, Programmer, Team Lead, Assistant Project Manager and Project Manager from
employee class. Add Basic Pay (BP) as the member of all the inherited classes with 97% of BP as DA, 10 % of BP as
HRA, 12% of BP as PF, 0.1% of BP for staff club fund. Generate pay slips for the employees with their gross and net
salary.

Objectives: 1) To Study Inheritance and its types


2) To implement inheritance using OOP language
Theory:
1)What is Inheritance?
2) Example(sample Code showing syntax of java inheritance using extends keyword )
3) What is IS-A relationship
4) What is HAS-A Relationship
5)Explain Types of Inheritance
(Answer the above questions with examples)
Input:
Empid, address, mailid, mobileno, Basic Pay (BP)
Output:
Gross_salary and Net_salary slip

Conclusion:

Write the algorithm and draw the flowchart.

You might also like