You need to build an algorithm for the same.
Points to be observed
1.) Verification of parameters based on data type support and compatibility. 2.) Which operator should be followed by the operand of a particular data type. 3.) The result of returning some expression must again be compatible with the next operand or operator.
Give the opportunity to simulate a rule where the user can select the dataset by which the rule should be run.
eg,
a + b > c
Possible combinations.
1.) A, b can be a string, a number, or an integer. 2.) But the combination result a + b, if String, then the ">" operator cannot come.
source share