Define a Class in C++. (WORKER)
Define a class WORKER with the
following specification:
Private members
- · wno Int
- · wname 25 characters
- · hrwrk, wgrate float (hours worked and wagerte per hour)
- · totwage float
- · calcwg() A function to find hrwrk*wgrate with float return type
Public members
- · In_data() A function to accept values for wno, wname, hrwrk, wgrate and invoke calcwg() to calculate totwage.
- · Out_data() A function to display all the data members on the screen you should give definitions of functions.
No comments
Post your comments