Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

9 a b c add Add the values in cell b and cell c and store the result in cell a.

ID: 3744268 • Letter: 9

Question

9 a b c       add          Add the values in cell b and cell c and store the result in cell a.

10 a b c        subtract            Same as 9, but do cell b cell c.

11 a b c        multiply            Same as 9, but do cell b cell c.

12 a b c        divide            Same as 9, but do cell b / cell c.

13 a b c        remainder        Same as 9, but do cell b % cell c.

14 a b c        equal            Same as 9, but do cell b == cell c.

15 a b c        not equal        Same as 9, but do cell b != cell c.

16 a b c        less than        Same as 9, but do cell b < cell c.

17 a b c        less than or equal        Same as 9, but do cell b <= cell c

Translate this to Java methods

Explanation / Answer

class ArithmeticRelational
{
public static int add(int b,int c)
{
int a=b+c;
return a;
}
public static int subtract(int b,int c)
{
int a=b-c;
return a;
}
public static int multiply(int b,int c)
{
int a=b*c;
return a;
}
public static int divide(double b,double c)
{
int a=b/c;
return a;
}
public static int remainder(int b,int c)
{
int a=b%c;
return a;
}
public static boolean equal(int b,int c)
{
int a=(b==c);
return a;
}
public static boolean notEqual(int b,int c)
{
int a=(b!=c);
return a;
}
public static boolean lessThan(int b,int c)
{
int a=(b<c);
return a;
}
public static boolean lessThanOrEqual(int b,int c)
{
int a=(b<=c);
return a;
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote