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();
overloadstream insertion opertator to display the data of object on the console
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
Overloading Unary Operators class sign {int a,b,c; public: sign(){}; sign(int,int,int); void putdata(void); void operator-(); }; void sign::operator-() {a=
What I need is an auto-click bot. The auto-click bot would ask me for a url(or it would be pre-defined too) so that it loads that specific url and click an ad automatically. This w
Literals (Constants) Constants are data storage locations whose address is not accessible for the user. Their value is not altered during the course of the program. Literal
Many modern cryptography algorithms require two numbers that are coprime, or sometimes referred to as relatively prime. Two numbers are coprime if their greatest common divisor is
Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.
Many human diseases could be controlled by the knowledge of the gene’s structure and pattern. The human gene could be represented by four nucleotides. Each nucleotide is represente
Modify the FACTOR program in this chapter so that it repeatedly asks for a number and calculates its factorial, until the user enters 0, at which point it terminates. You can enclo
I need Profile and optimize a C++ library for speed Project Description: Optimize and profile an existing C++ library for speed. This library uses OpenMP and OpenCV and C+
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