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

Please do it like what the sample run shows (java) Write a method isEven that us

ID: 3806650 • Letter: P

Question

Please do it like what the sample run shows

(java) Write a method isEven that uses the remainder operator (%) to determine whether an integer is even. The method should take an integer argument and return true if the integer is even and false otherwise. Incorporate this method into an application that inputs a sequence of integers (one at a time) and determines whether each is even or odd.

Sample run:

Enter a number: 0

0 is even

Enter y yo play again, n to quit(y/n):y

Enter a number:7

7 is odd

Enter y to play again, n to quit(y/n):n

Explanation / Answer

Below is the code that decides odd or even number:

Thank you.