C++ i want 7 files header,imp,main. Please follow the instructions

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

C++ i want 7 files header,imp,main. Please follow the instructions

 
Define the following three classes which represent three different
employees
Class Namelas Publicly thata Members
Member Functions
Person
Worker
Engineer Serived Worker deee
Inherits
ase one ratName, larNamet, person
derived Person alary, araining
wt. print finalary, weker
et, priat. fialary, engineer
firstName, lastName, training, and degree are variables of type string.
Salary is a variable of type integer.
The salary is incremented according to the following table
Truining
Diploma Salaryope
Steel
Carpentering 200 lectrical 3500
Flectrician
Designer
Degree
Salary
400 Civil
3000
300 Compute 4000
350
The function print() only prints the salary. Additional member functions
can be added as needed.
Declare a member function print( ) of the base class Person as a virtual
function.
Make the base class Person an abstract base class by declaring a member
function findSalary( ) a pure virtual function.
The following driver produces the given sample of output:
int main()
worker one("Ali", "Omar". "Electrician");
engineer two("Ali", "Omar", "Electrician", "Electrical");
person "ptrPersonOne, "ptrPersonTwo;
ptrPersonOne = &one;
ptrPersonTwo = &two;
ptrPersonOne -> findSalary();
ptrPersonTwo -> findSalary();
ptrPersonOne -> print():
cout << endl;
ptrPersonTwo -> print):
cout << endl;
return 0;
worker receives a basic salary.
An engineer receives the basic salary of the worker plus 3000, 3500, or
4000 based on the type of his degree.
Sample Run:
Ali Omar salary as a worker is: 300
Ali Omar salary as an engineer is: 3800
Transcribed Image Text:Define the following three classes which represent three different employees Class Namelas Publicly thata Members Member Functions Person Worker Engineer Serived Worker deee Inherits ase one ratName, larNamet, person derived Person alary, araining wt. print finalary, weker et, priat. fialary, engineer firstName, lastName, training, and degree are variables of type string. Salary is a variable of type integer. The salary is incremented according to the following table Truining Diploma Salaryope Steel Carpentering 200 lectrical 3500 Flectrician Designer Degree Salary 400 Civil 3000 300 Compute 4000 350 The function print() only prints the salary. Additional member functions can be added as needed. Declare a member function print( ) of the base class Person as a virtual function. Make the base class Person an abstract base class by declaring a member function findSalary( ) a pure virtual function. The following driver produces the given sample of output: int main() worker one("Ali", "Omar". "Electrician"); engineer two("Ali", "Omar", "Electrician", "Electrical"); person "ptrPersonOne, "ptrPersonTwo; ptrPersonOne = &one; ptrPersonTwo = &two; ptrPersonOne -> findSalary(); ptrPersonTwo -> findSalary(); ptrPersonOne -> print(): cout << endl; ptrPersonTwo -> print): cout << endl; return 0; worker receives a basic salary. An engineer receives the basic salary of the worker plus 3000, 3500, or 4000 based on the type of his degree. Sample Run: Ali Omar salary as a worker is: 300 Ali Omar salary as an engineer is: 3800
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY