Question: Step 1 : Declare a class Employee in two separate namespaces namely SeniorEmp and JuniorEmp & store it in Employee.h Step 2 : Define all
Step : Declare a class "Employee" in two separate namespaces namely SeniorEmp and JuniorEmp & store it in Employee.h
Step : Define all the member methods of Employee Class and store it in Employee.cpp
Employee : to initialize the member variables to NULL
EmployeeEmpNoEmpName,BasicSalary: To initialize the member variables with the parameters received
CalculateSalaryBasicSalary : To calculate the salary using following formula:
For namespace SeniorEmp: BasicSalaryBasicSalary
For namespace JuniorEmp: BasicSalaryBasicSalary
Step :
Define a main function and store it in EmployeeMain.cpp
Create an object oSenior of Employee class belonging to SeniorEmp namespace.
Calculate the salary for oSenoir and display the same using cout.
Create an object oJ Junoir of Employee class belonging to JuniorEmp namespace.
Calculate the salary for oJ unior and display the same using cout.
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
