boolean comparebasic(object operand1, object operand2, string operator) throws exception{
if (operator is "<=" or "<" or ">=" or ">"){
convert operand1 and operand2 to number
compare the two numbers with the operator;
}else if("=".equals(operator)||"!=".equals(operator)){
if(at least one object is boolean){convert the other object to boolean}
if(at least one object is number){convert the other object to number}