Define a Class in C++. (EMPLOYEE)
Define a class EMPLOYEE with
the following specifications:
Private members
- · empno integer
- · ename 20 characters
- · basic,hra,da float
- · netpay float
- · calculate() a function to calculate basic + hra + da with float return type.
Public members
- · havedata() Function to accept values for empno, sname, basic, hra, da and invoke calculate() to calculate netpay
- · display() Function to display all the data members on the screen.
No comments
Post your comments