Write a value-returning method, isVowel, that returns the value true if a given character is a vowel, and otherwise returns false. Also write a program to test your method.
The electoral petition of 2021 was aimed at determining the winner of the 2020 election. The rule is that the winner of an election in Ghana must obtain at least 50% +1 of the valid votes cast. a. Explain the concept of function in C++
b. Declare a function called Greatest, your function should have five arguments 3 i. The two names of the presidential candidates with the most votes ii. Total number of votes for each of them. iii. Total valid votes cast.
c. Your function should declare that candidate that had at least 50%+1 of the valid votes cast as winner.
d. Explain the logic behind the code
write a program to find the smallest value in a vector that is larger than the smallest vaue presented. for example 1 ,2 , -7 . -6 . 3 smallest = -5 . another example -45 , -1000 , -1 , -2 , smallest is -999
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 )