Q1- What is Friend Function. What are the merits & Demerits of using friend function. (2)
Q2- Define the following terms-(2)
- Abstract Data Type
- Object Model
Q4- Create an object oriented program in C++ to create a payroll system of an organization with the following information read from the keyboard:
employee name, employee code, designation, account number, date of joining, basic pay, DA, HRA, deductions like PF, Loan, Income Tax etc.
Design a base class consisting of employee name, employee code and designation and another base class consisting of account number and date of joining. The derived class consists of basic pay plus other earnings and deductions. Calculate and print the net pay of employee.