

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Page 1 of 2
Write a C++ program consisting of the four related classes presented in the UML diagram below. Complete the program with the provided driver program (no modification required).
+Employee(in n : string) +operator<<(in out : ostream&, in e : Employee&) : ostream&
-name : string
Employee
+SalariedEmployee(in name : string, in s : double) +operator<<(in out : ostream&, in e : SalariedEmployee&) : ostream&
-salary : double
SalariedEmployee
+WagedEmployee(in name : string, in w : double, in h : double) +operator<<(in out : ostream&, in e : WagedEmployee&) : ostream&
-wage : double -hours : double
WagedEmployee
+SalesEmployee(in name : string, in sal : double, in com : double, in totsales : double) +operator<<(in out : ostream&, in e : SalesEmployee&) : ostream&
-commission : double -sales : double
SalesEmployee
Page 2 of 2