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();
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
Define Register Storage Class - computer programming? The Storage class register notify the compiler that the associated variables must be stored in high-speed memory register.
hwat is the area fsdjlakl;aeklfjtealrtl;gka
In rPeANUt implement the "char getchar()" and "void printstring(char *str)" functions. Using these functions implement the following: void main() { while (1) { ch
source code in c ?
In general, Roman numerals can be converted mathematically by simply assigning a numerical value to each letter, according to the chart below, and calculating a total: M=1000 | D=5
a program to determine whether a number is an odd or even using recursive function
Charity Ball Organizer Many charities support good causes, but one of the difficulties each of them has is organizing their fundraising events. After nearly a semester of C progra
Multiple Inheritance Multiple inheritance , as the name suggests , is deriving a class from more than one class . The derived class inherits all the properties of all its base c
Program to store family members details in C++: #include #include #include struct record { char name[30]; int age; char state[40]; }x; //cal
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