QuestionQ38

Aspect of Code Quality

You are reviewing the following Java function that determines whether a number entered by the user is even or odd:

Question Image

Use the following checklist:

  • All variables must begin with a capital letter.
  • All output messages must begin with a capital letter.
  • A comment line must explain the purpose of the class.

How many checklist items have been fulfilled?

Explanation

The variable read does not start with a capital letter, the messages beginning with your input number do not start with a capital letter, and the class has no purpose-explaining comment. Thus, none of the checklist requirements is satisfied.

Community Discussion

No comments yet. Be the first to start the discussion!