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();
Question : (a) What is a structure? Provide a simple example of your own to illustrate this feature. (b) How does a structure differ from an array? (c) Describe a structu
Write a program that reads a line of characters from the user and displays that entire line after converting any uppercase characters to lowercase also change any lowercase charact
Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send
Define the Keywords of c language? C keeps a small set of keywords for its personal use. These keywords can't be used as identifiers in the program. Here is the list of keyword
algorithm
Pebble Merchant Problem Description There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides
Define the Arithmetic Operators in c Language? There are five arithmetic operators in C and they are Operator Purpose + Addition -
Write a program that allows user to enter number of elements in an array. The program then allows user to enter the elements. Write a function called max that returns the position
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
Tracing of Abstract array: inline int isZero( const Object& o ) { return o == NOOBJECT; } int AbstractArray::isEqual( const Object& obj ) const {
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd