Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Program is to define a class as employee:
Write a program to define a class as employee and collect information about them by using classes and object
class employee
{
private:
char name[20];
int empno;
float basic,hra,da;
float netpay;
float calculate()
netpay=basic+hra+da;
return netpay;
}
public:
void readdata();
void dispdata();
};
void employee::readdata()
clrscr();
cout<<" enter your name "<<"\n";
gets(name);
cout<<" enter the empoyee number "<<"\n";
cin>>empno;
cout<<" enter the basic salary "<<"\n";
cin>>basic;
cout<<" enter the house rent allowance "<<"\n";
cin>>hra;
cout<<" enter the dearance allowance"<<"\n";
cin>>da;
void employee::dispdata()
cout<<" the name is :"< cout<<" the employee number is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
cout<<" the employee number is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
calculate();
cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
void main()
employee info;
info.readdata();
info.dispdata();
Example for external storage class - computer programming? extern double sin (double); In a function prototype, for the sin() function its function definition ~ we can write
Rules for overloading an operator This summarizes the most significant points you need to know in order to do operator function overloading. The only operators you may o
implement two stacks in one array A[1...n] in such a way that neither stack overflows unless the total number of elements in both stacks together is n. For this you need to produce
A: Multiple providers of libraries might employ common global identifiers causing a name collision whereas an application attempt to link with two or more such libraries. The names
Program is to define a class as student: Program is to define a class as student and display the records specific depending upon the number class student { private:
Explain U s e r - D e f i n e d D a t a T y p es? C has Union and Structure as user-defined data types. C++ has class which looks like structure with a
For this assignment, I've provided a data file called 'elevation.mat', which contains the elevation data you'll be working with. Type load elevation.mat to get the varia
create a shopping cart in c++
countSpaceAvailbility function that counts and returns the space availability in the circle queue there are two elemnts at the circle queue and should return 5 space if size 7 .
#include stdio.h> #include conio.h> #include ctype.h> #include string.h> void main() { int i=0,j=0,length; char a[30]; cl
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd