I am using java to create a program that gives the user the option to either add two numbers multiply two numbers or see if the 2 numbers are equal this is what i have so far. I know hot to the menu option so that is ommitted. how can i do the equals>> like equals(x,y) or equals(x,plus(x,y)) am i on the right track? any feedback would be appreciated
equals(x,plus(x,y);
sum = plus(x,y);
product = times(x,y);
public int Plus(int x, int y)
{
return (x + y);
}
public int Times(int x, int y)
{
return (x * y);
}
public bool equals(int x, int y)
{
if(x==y)
return true
else
return false
}