Give me only code, No need to run Consider the following partial class declaration of an ADT: class Employee {friend ostream& operator<<(ostream& outs. const Employee & the_emp); //output name and salary with salary in the format Rxxx.xx public: Employee(string n, double sal); ~Employee(): void setSalary(double sal); string getName()const void raiseSalary(double percent); // raises an employee's //salary with the percentage specified by the argument percent private: string name: double salary: }; Use the appropriate member functions given in the partial class declaration for the class Employees to write statements to do the following: • Use the overloaded constructor to instantiate an object newEmployee of the class Employee with the name "Mpho Malebane" and a salary of R123 000. • Write a statement to check whether the object newEmployee is Mpho Malebane, and if so, raise his salary with 10%. • Use the overloaded stream insertion operator to display the name and salary of the newEmployee on the screen.
Give me only code, No need to run Consider the following partial class declaration of an ADT: class Employee {friend ostream& operator<<(ostream& outs. const Employee & the_emp); //output name and salary with salary in the format Rxxx.xx public: Employee(string n, double sal); ~Employee(): void setSalary(double sal); string getName()const void raiseSalary(double percent); // raises an employee's //salary with the percentage specified by the argument percent private: string name: double salary: }; Use the appropriate member functions given in the partial class declaration for the class Employees to write statements to do the following: • Use the overloaded constructor to instantiate an object newEmployee of the class Employee with the name "Mpho Malebane" and a salary of R123 000. • Write a statement to check whether the object newEmployee is Mpho Malebane, and if so, raise his salary with 10%. • Use the overloaded stream insertion operator to display the name and salary of the newEmployee on the screen.
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 6E
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning