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   <>Employee(fn:string,                ln:string, mSal:int) +setFirstName(fn:string) +getFirstName():string +setLastName(ln:string) +getLastName():string +setMonthlySalary(mSal:int) +getMonthlySalary():int +displayEmployee()

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
icon
Related questions
Question

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()

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Structure chart
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning