Page 1 of 1

About Question enthuware.ocpjp.i.v11.2.1176 :

Posted: Sun Jun 14, 2020 1:12 am
by dimitrilc
The wording of this question is very confusing as the first phrase contradicts the second phrase. First it stated that the argument was given on the CLI, but then it stated that no argument was given. The confusion here is, "The program cannot print out the last argument AND [when] no argument was given."
print the last argument given on the command line to the standard output, and exit without any output or exception stack trace if no arguments are given?
I had to read it for a long time to finally understand that the specifications are independent of one another. Changing "and" to "or" fixed it.
print the last argument given on the command line to the standard output, OR exit without any output or exception stack trace if no arguments are given?

Re: About Question enthuware.ocpjp.i.v11.2.1176 :

Posted: Sun Jun 14, 2020 2:30 am
by admin
I respectfully disagree because the second phrase uses "if", "and exit without any output or exception stack trace if no arguments are given". That makes the intention of the question quite clear.

Further, if you are talking about logical precision, here is another interpretation:
There are two requirements to be fulfilled -
1. If there are arguments, print the last argument
2. If there is no argument, print nothing.

Both 1 and 2 have to be fulfilled by the program.

If we go by your interpretation, the program would be acceptable if it fulfills either of the requirements. That is clearly not what is expected. Your interpretation is valid if you consider both the outcomes as one requirement and there wouldn't be any "if" in the statement in that case.

In the exam, you will even see a problem statement with three/four words, "What will happen?" or "What is the output?" followed by code. Would you sit there thinking whether it is asking about compilation or execution or something else? No, because the context of the question and the given options will tell you what it means.

But English is not my first language so, I will confirm it with someone else. You may also do so if that is the case with you too.

thank you for your feedback!
Paul.