ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 68 - CTAL-TTA discussion

Report
Export

You are ar teviemng the fdbwng Java furxton that deteimates whether a curb*. rput by the user. * Even or Odd Public das Oddorfven {

public state void mair^Strcg [ | args) (

Scarcer read - new ScanrerfSystem inje

System out prim ('Pease enter a rxmber'i;

int Number * reader nextfntO,

if(Number^20)

System out prrrtln 'your input number 'Number * is even ).

else

System out prntirfyour input number 'Number * is odd*);

)

}

You are Qj>ded by '.he following checklist

* All variables must start with a Capital letter

* All output messages must start with a Capita letter

* There must De a comment bne e pla ning the purpose of the dess

How many checklist items Mve been fuelled7

SELECT ONE OPTION

A.
3
Answers
A.
3
B.
None
Answers
B.
None
C.
1
Answers
C.
1
D.
2
Answers
D.
2
Suggested answer: C

Explanation:

Only one of the checklist items has been fulfilled in the Java function provided. Option C is correct.

Checklist Review:

Capitalization of Variables: The variable 'Number' does start with a capital letter, fulfilling this checklist item.

Capitalization of Output Messages: The output messages do not start with a capital letter following the prompt text (e.g., 'your input number...'), failing this checklist item.

Comment Line: There is no comment line explaining the purpose of the class or method, failing this checklist item.

Thus, only the requirement regarding the capitalization of the variable is met, indicating a partial adherence to the specified coding standards .

asked 18/09/2024
LEONARDO CESAR MARQUES
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first