- 6
A company is interested in implementing a payroll system for its employees. You are requested to develop such program in which
7 Respostas
+ 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.