*2. Consider the mystring class *

* Class mystring *

* {*

* char str [100];*

* int length;*

* Public:*

* // methods *

* };*

* Overloading the method called “check” for the class to perform the following operations.*

*i)Check if a specific character is present in str. Returns position if found, -1 if not.*

*ii)Compares the length of two mystring objects and returns 1 if they are equal, 0 if not. With attribute real and imaginary.*

*3. Define a class for a 3 dimensional points.*

*Write necessary member functions for accepting & displaying the point object.*

*Overload the following operators:*

*Operator Example Purpose*

*+ (Binary) p3=p1+p2 adds coordinates of point p1 to p2.*

*– (Unary) -p1 Negates coordinates of point p1.*

*5. Write a C++ program using class to calculate simple interest amount use default value for rate.*

*7. Define a class for 3 dimensional points necessary member*

* functions for accepting and the point object Overload the following operators:*

*Operator Example Purpose*

** (Binary) p3=p1*p2 multiplies coordinates of point p1 with p2.*

*– (Binary) p3=p2-p1 subtracts coordinates of p1 from p2.*

*8. Write a C++ program using class to overload following binary operators (+,-,*,/).*

*9. Consider the following class mystring*

* Class mystring*

* {*

* char str [100];*

* Public:*

* // methods*

* };*

* overload operator “= =” to compare two strings.*

*10. Consider following class Numbers*

* Class Numbers*

* {*

* int x,y,z;*

* public:*

* // methods*

* };*

*Overload the operator unary minus- to negate the numbers.*

*11. Consider the following class mystring*

* Class mystring*

* {*

* char str [100];*

* Public:*

* // methods*

* };*

*Overload operator + to concatenate two strings such as string1+string2=string3.*

*14. Consider the following class Person*

* Class Person *

* {*

* char Name [20];*

* char Addr [30];*

* float Salary;*

* int Property;//in sq. foot area*

* float tax_amount;*

* Public:*

* // methods *

* };*

*Calculate tax amount by checking salary and the property of the person*

* For salary <5000 tax rate=0*

* For salary >=5000||<=10000 tax rate= 14% of salary.*

* For salary >=10000 tax rate =16% of salary.*

*In this tax amount add following amt depending on the size of area in sq.foot *

* For 1000 sq. foot area amt=0.*

* For >1000|| < 5000 sq. foot area amt= 1000*

* For >5000||<= 10000 sq. foot area amt=3000.*

*15. Write a C++ program to define function power to raise a number m to a power n the function takes a double value for m. And integervalue for n and return the result correctly use a default value of 2 for n to make the function calculate squares when this argument is omitted*

*18. Write a C++ program to find volume of cube, cylinder an rectangle using function overloading.*

*21.Consider the following class mystring*

* Class mystring *

* {*

* char str [100];*

* Public:*

* // methods *

* }; *

*Overload operator “!” to reverse the case of each alphabet in the string.*

*23. Write a C++ program to find area of triangle, circle,and rectangle using function overloading.*

*class complex*

* {*

* float real;*

* float imaginary;*

* public:*

* };*

*overload operater ‘+’ to add object of two class use parameterized constructor for accepting value of complex number.*

*27. Consider a class Matrix*

* Class Matrix*

* {*

* int a[3][3];*

* Public:*

* //methods;*

* }; *

*Let m1 and m2 are two matrices. Find out m3=m1+m2 (use operator overloading).*

*28.Consider a class Matrix*

* Class Matrix*

* {*

* int a[3][3];*

* Public:*

* //methods;*

* }; *

*Overload the – (Unary) should negate the numbers stored in the object.*