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();
Problem: (a) Using a class hierarchy of your own choosing, with at least TWO subclass levels, show (i) the use of abstract and concrete forms of Java class and method in you
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 { pr
Data is required to be fed into the program (input) and sent out of the program (output). Considering the draughtsman using a CAD station, the input is his commands to cause lines/
obtain two numbers from thekey board,and determain and display(if either)is the larger of two numbers.
find area uder the curve y=f(x) between x=a and x=b #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; in
Write in a file: void main() { int i,j,k,l,list[1000]; FILE *fp; char any[8]; cout cin >> any; fp = fopen(any,"wb"); for(j=0;j {
count the number of string in n-th padovan string
A: Memory that has no pointer pointing to it and there is no method to delete or reuse this memory(object), it causes Memory leak. { Base *b = new base(); } Out of this
Define a class polynomial with three private data members a, b and c of type double to represent the coefficient of two degree polynomial(ax^2+bx+c). Include a constructor in a pol
Normal 0 false false false EN-US X-NONE X-NONE
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