- 6
A company is interested in implementing a payroll system for its employees. You are requested to develop such program in which
7 Answers
+ 8
Something is wrong! I was never able to put more than 10 tags.
+ 5
Lol that's not how you use keyword tags đđ
Please use relevant keywords and not put the entire question in keywords đľ
You can develop a payroll program in so many languages. Do u have any specifics so that we can help u out.?
0
A company is interested in implementing a payroll system for its employees. You are requested to develop such program in which you must :
⢠Declare the base class emp.
⢠Use the function called getInfo(), to get the employee details.
⢠Declare the derived class salary.
⢠Declare and define the function getSalary() to get the salary details.
⢠Define the function calculateNet() to find the net pay.
⢠Read the number of employees.
⢠Call the function getInfo(),getSalary() and calculateNet() to each employees.
Test the above operations by writing a complete C++ program using single inheritance.
0
#include<iostream.h>
#include<conio.h>
class emp
{
public:
int eno;
char name[20],des[20];
void get()
{
cout<<"Enter the employee number:";
cin>>eno;
cout<<"Enter the employee name:";
cin>>name;
cout<<"Enter the designation:";
cin>>des;
}
};
class salary:public emp
{
float bp,hra,da,pf,np;
public:
void get1()
{
cout<<"Enter the basic pay:";
cin>>bp;
cout<<"Enter the Humen Resource Allowance:";
cin>>hra;
cout<<"Enter the Dearness Allowance :";
cin>>da;
cout<<"Enter the Profitablity Fund:";
cin>>pf;
}
void calculate()
{
np=bp+hra+da-pf;
}
void display()
{
cout<<eno<<"\t"<<name<<"\t"<<des<<"\t"<<bp<<"\t"<<hra<<
"\t"<<da<<"\t"<<pf<<"\t"<<np<<"\n";
}
};
void main()
{
int i,n;
char ch;
salary s[10];
clrscr();
cout<<"Enter the number of employee:";
cin>>n;
for(i=0;i<n;i++)
{
s[i].get();
s[i].get1();
s[i].calculate();
}
cout<<"\ne_no \t e_name\t des \t bp \t hra \t da \t pf \t np \n";
for(i=0;i<n;i++)
{
s[i].display();
}
getch();
}
0
Tnkx you're crrct
0
A company is interested in implementing a payroll system for its employees. You are requested to develop such program in which you must : ⢠Declare the base class emp. ⢠Use the function called getInfo(), to get the employee details. ⢠Declare the derived class salary. ⢠Declare and define the function getSalary() to get the salary details. ⢠Define the function calculateNet() to find the net pay. ⢠Read the number of employees. ⢠Call the function getInfo(),getSalary() and calculateNet() to each employees. Test the above operations by writing a complete C++ program using single inheritance.
- 1
Anyone can do this question??
A company is interested in implementing a payroll system for its employees. You are requested to
develop such program in which you must :
⢠Declare the base class emp.
⢠Use the function called getInfo(), to get the employee details.
⢠Declare the derived class salary.
⢠Declare and define the function getSalary() to get the salary details.
⢠Define the function calculateNet() to find the net pay.
⢠Read the number of employees.
⢠Call the function getInfo(),getSalary() and calculateNet() to each employees.
Test the above operations by writing a complete C++ program using single inheritance.