Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Step 1 : Declare a class Employee in two separate namespaces namely SeniorEmp and JuniorEmp & store it in Employee.h Step 2 : Define all

Step 1: Declare a class "Employee" in two separate namespaces namely SeniorEmp and JuniorEmp & store it in Employee.h
Step 2: Define all the member methods of Employee Class and store it in Employee.cpp
Employee (): to initialize the member variables to 0? NULL
Employee(EmpNo,EmpName,BasicSalary): To initialize the member variables with the parameters received
CalculateSalary(BasicSalary) : To calculate the salary using following formula:
For namespace SeniorEmp: BasicSalary+BasicSalary (15100)
For namespace JuniorEmp: BasicSalary+BasicSalary (8100)
Step 3:
Define a main function and store it in Employee_Main.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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

What does it imply if the compressibility factor is larger than 1?

Answered: 1 week ago