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()
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 now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images