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 teacher:
Program is to define a class as teacher and collect information about them by using classes and object
class teacher
{
private:
char name[20];
char sub[10];
float basic,hra,da;
float salary;
int calculate()
salary=basic+hra+da;
return salary;
}
public:
void readdata();
void dispdata();
};
void teacher::readdata()
clrscr();
cout<<" enter your name "<<"\n";
gets(name);
cout<<" enter the subject you teach "<<"\n";
cin>>sub;
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 teacher::dispdata()
cout<<" the name is :"< cout<<" the subject you teach is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); teacher info; info.readdata(); info.dispdata(); }
cout<<" the subject you teach is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); teacher info; info.readdata(); info.dispdata(); }
calculate();
cout<<" the salary you get is : "< } void main() { clrscr(); teacher info; info.readdata(); info.dispdata(); }
void main()
teacher info;
info.readdata();
info.dispdata();
Explain one-definition rule (ODR). According to one-definition rule, C++ constructs should be identically defined in each compilation unit they are used in. As per ODR, two
Depreciation to a salvage value of 0. For tax purposes an item may be depreciated over a period of several years, n. With the straight line method of depreciati
Operation on String - C ++ Program: Write a program to define operations on string in c++. class String { char *char_ptr; // pointer to string contents int le
having 2 arrays and 3killograms of pebbles are needed converting an area of 1 square meter the rate of pebble is $5 per killograms
For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t
Is it probable to encompass Virtual Constructor? If yes, how? If not, Why?
A: They present a degree of freedom in the interface design options. Member functions & friend functions are equally privileged (100% vested). The major difference is that a fri
color representation 0,1,2,3,4,5,6,7,.......
example of padovan string program
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b
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