Question: c++ please include comments 2. Write a program that evaluates a predicate of the form (3r) P(z). Your program should define the following function Function

c++ please include comments
2. Write a program that evaluates a predicate of the form (3r) P(z). Your program should define the following function Function Name: eWffO Parameter(s):P(n) bool doi: string Return: bool where doi is the name of the file to open for reading and (*P) (int) is a function pointer of a bool function that takes an int as a parameter. The function eWff ) should read in and evaluate each element of the file with (P)(int); and then, it should return the truth value of (3r) P(z) with the file as the domain of interpretation. Along with the above function, your program should define Function Name isEven ) Parameter(s): int Return: Function Name:isMult3) Parameter(s)r: int Return: bool where isEven) returns true only if the absolute value of its parameter is even, and isMult3) returns true only if the absolute value of its parameter is a multiple of 3. Use the following main function nt main() string filesl2] {"datal.txt","data2.txt'h for(int i = 0,i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
