Class definition of employee.

Q7. Write definition for a class employee that can hold information like employee no, name, design, dept, basic salary and have associated for printing payslips, modifying as employee’s details, printing an employee’s work report.

Ans.

char employee

{

int emp_no;

char name[25];

char design[15],dept[10];

float basic;

payslip();

modify();

prnreport();

};

Leave a Reply

Your email address will not be published. Required fields are marked *

74 Views
%d bloggers like this: