Write a program to overload unary operator for complex class. Overload the pre and post decrement operator to work for the statements
C1++;
++C1;
Overload any operator of your choice to find the modulus of a complex number. [ Note: void return type]
Also rewrite this program to overload the operators as friend function.
Write a program to add two objects of time class. Overload the operator ‘==’ to compare two objects and display whether they are equal or not. Also rewrite this program to overload the operators as friend function.
Create a class which allocates the memory for a string through dynamic constructor. Overload
Also rewrite this program to overload the operators as friend function.
Create a class which stores distance in feet and inches. Overload the ++ (post and pre) operator for the class for the statements D2=++D1 and D2=D1++ as member function. Also rewrite this program to overload the operators as friend function.
3x4 sin(180x) + 4x3 cos(90x) + x2 sin(tan(45)) + 7x + 9cos(90x2 )
The maximum height reached by a ball thrown with an initial velocity, v, in meters/sec, at an angle of θ is given by this formula:
height = (.5 × v2 × sin2 θ) / 9.8
Using this formula, write, compile, and run a C++ program that determines and displays the maximum height reached when the ball is thrown at 5 mph at an angle of 60 degrees. (Hint: Make sure to convert the initial velocity into the correct units. There are 1609 meters in a mile.) Calculate the maximum height manually, and verify the result your program produces. After verifying that your program works correctly, use it to determine the height reached by a ball thrown at 7 mph at an angle of 45 degrees.
Write a function that replaces the elements of an integer sequence whose value a is the value of b. Write a main program that uses that function and displays the resulting sequence of numbers on the screen. (Example: for the integer sequence 1, 2, 5, 2, 6, 7, 8, 12. Replace the numbers with the value 2 with the number with the value of 9, then we get the result sequence 1, 9, 5, 9, 6, 7, 8, 12)
Defines a struct that describes a point in 2D space. The values of coordinates and coordinates are floats.
Write a function that calculates the distance of any 2 points
Write a function that changes the coordinates of a point.
Write a main program using the above functions.