
Using the given the UML Diagram as reference. Write a C++ program (main function only) that creates an instance of the class Employee for a specific person and inputs (passes) the relevant data about the name and salary to the object, then displays the information on the screen. Assume that the display function is coded to output the values of all the data members in the correct format. You don t need to write the individual member function code, just use the functions as presented, with data and with proper syntax of course.
UML
Employee |
-fn:string -ln:string -mSalary:int
|
<<constructor>>Employee(fn:string, ln:string, mSal:int) +setFirstName(fn:string) +getFirstName():string +setLastName(ln:string) +getLastName():string +setMonthlySalary(mSal:int) +getMonthlySalary():int +displayEmployee() |

Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images

- Choose the correct statements. The this pointer is accessible (i) Within all the member functions of the class (ii) Only within functions returning void (iii) Only within non-static functions (iv) Within the member functions with zero argumentsarrow_forwardWhat is type casting? Explain implicit and explicit type conversion with example.arrow_forward1. Write a program in the C++ language to create a class Triangle with three member integer variables side1, side2, and side3. Add the parameterized constructor for the class and add a member function findArea that displays the area of the triangle in the output.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





