Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Ambiguous question / answers possible ?

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In one of the mock exam, there is this kind of question / answers:

Which results are NOT possible ? (Choose all that apply)
A. "ABABAB"
B. "AAABBB"
C. "BBAABB"
D. "AAAAAA"
E. The code does not compile.
G. An error occurs at runtime.

For me, results where aim to the execution of the program and not to the answer at this precise question. So I check the impossible "result" but let the box E and G uncheck... ( even if I was knowing that E and G would never happen )

Which decide me was the fact that IF the code would not compile, I would need to check everything except that which was kind of gay. So I put in my mind E and G in special cases outside the meaning of "results"

Can I find those ambiguous ( for me ) question or answers at the real exam ?
I was clearly knowing the good result AND ONLY this ambiguous formulation make me miss it.
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The English of this post is so broken than I can't be sure what the question is.
 
author and iconoclast
Posts: 24203
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are implying, I think, that on some test question, the correct answer is "The code does not compile," but if it did compile, the answer would be, say "B". And you believe that you should be allowed to select "B", and that should be the correct answer.

But let me ask you: if a tree falls in the forest, with no one there to hear, does it make a sound? If a program fails to compile, does it produce any output when it runs?

The answer to both of these questions is "MU".

Here's a tip: if one of the choices is "does not compile", take a good look at the program first and make sure it will compile. Because you can bet that there are, indeed, "trick" questions like this on the test.

Finally, I recall that back in the late 1970's, it was rather common for my middle-school buddies and I to say that something we disliked was "gay." Until this moment, I thought that this locution had fallen out of use; apparently I was wrong. I would like to point out to you that saying that something bad is "gay" is likely to offend people; perhaps even your next potential boss. It's not nice and it's not OK at JavaRanch, so let's not say that anymore, please.
 
author
Posts: 9031
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In addition to what Ernest said, we're pretty clear in the book that "Choose all that apply." is a phrase we use in our mocks to make them tougher, but in the real exam you will ALWAYS be told how many answers are correct.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a real exam question, you will be told exactly how many answers are considered correct for the question. So if, for example, there are one answers which you are sure are correct, and one which you think is ambiguous, then if the quastion asks you to pick two answers, pick just the first two that you're sure about. And if it asks you to pick three answers, then you should also include the ambiguous third response.

[John]: Which decide me was the fact that IF the code would not compile, I would need to check everything except that which was kind of gay.

Options E and G (what, no F?) are pretty much standard options you will see on many, many questions, even if they don't really make that much sense given the way the question is constructed. Yes, if the code does not compile, then the other answers are either all false (usually), or in this case all true, since the question asked what was NOT possible.

In general, you should never select answers like E and G unless you can see a specific error that will occur. If you're just thinking that an error may occur (but you're not sure), look carefully, and if you can't find a specific error that you're sure about, then you should probably not select the "error occurs" answer.
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bah - a pox on both of you!
 
Eric Janssens
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ernest Friedman-Hill:
Finally, I recall that back in the late 1970's, it was rather common for my middle-school buddies and I to say that something we disliked was "gay." Until this moment, I thought that this locution had fallen out of use; apparently I was wrong. I would like to point out to you that saying that something bad is "gay" is likely to offend people; perhaps even your next potential boss. It's not nice and it's not OK at JavaRanch, so let's not say that anymore, please.



Thanks for that, as you can see my english is far from perfect AND I was not conscious of the current correct usage for this word apparently.
 
Eric Janssens
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bert Bates:
In addition to what Ernest said, we're pretty clear in the book that "Choose all that apply." is a phrase we use in our mocks to make them tougher, but in the real exam you will ALWAYS be told how many answers are correct.



Thank you ! I had forgot that point. I am happy now
 
Eric Janssens
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In general, you should never select answers like E and G unless you can see a specific error that will occur. If you're just thinking that an error may occur (but you're not sure), look carefully, and if you can't find a specific error that you're sure about, then you should probably not select the "error occurs" answer.



In fact, the "correct" answers where a combinaison of CDEG. This is why I was all confused.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So this is definitely a Thread question. I think in general these types of questions ask for you to select possible results, rather than never possible. But still could be a valid mock question that can help.

My guess is that C and D are not possible, without even seeing the code. My assumptions are that there are two threads, one prints "A" three times, and one that prints "B" three times.

Mark
 
Eric Janssens
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that was a thread question. I change a little the answers ABCD to not point to any real mock question but that was the idea behind. And I had the same answers as you, only to be surprise that I should have also answer E and G !?!
[ February 22, 2006: Message edited by: John Smith ]
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Jim]: In general, you should never select answers like E and G unless you can see a specific error that will occur.

OK, I will add: Unless, obviously, the question asks you which answers are NOT possible. (Which is the opposite of the usual type of question.) If you have no good reason to think that an error will occur, your answer should probably be that an error will not occur. You have to read the question to determine how to answer it correctly. One of the points of this question is that questions on the real exam sometimes use words like "NOT" (cleverly hidden with capital letters ), and it's the test taker's responsibility to read the question and interpret it correctly.
 
Bert Bates
author
Posts: 9031
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the general rule is that it's okay to display entire mock questions here as long as you credit them to the author - it's a great way to discuss topics. So you'll often say people say :This is from Mughal, chapter x"...
 
Eric Janssens
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the Question 60 / 76 from MasterExam (from K&B 5.0 CD)



Originally posted by Jim Yingst:
[Jim]: In general, you should never select answers like E and G unless you can see a specific error that will occur.

OK, I will add: Unless, obviously, the question asks you which answers are NOT possible. (Which is the opposite of the usual type of question.) If you have no good reason to think that an error will occur, your answer should probably be that an error will not occur. You have to read the question to determine how to answer it correctly. One of the points of this question is that questions on the real exam sometimes use words like "NOT" (cleverly hidden with capital letters ), and it's the test taker's responsibility to read the question and interpret it correctly.



Yes, and I explain in my first post that my problem was how to decide IF E and G option were part of the results OR not. If the question had been "Which ANSWERS are NOT possible?" I probably not have any confusion at all.

Well, if I am the only one to find this kind of question ambiguous, I will stop to talk about it.
[ February 22, 2006: Message edited by: John Smith ]
 
Jim Yingst
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, I think I see what you're getting at. In the book (and on the exam, I think), "result" is used in the most general way possible. If you try to compile and run some code, possible results may include (1) it won't compile, (2) it will error at runtime, (3) it will run and print something out. In some questions other results are possible azs well. In general, anything that can happen when you compile and run some code is a "result" of that action.
[ February 22, 2006: Message edited by: Jim Yingst ]
 
Eric Janssens
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, i will not forget it !

result == answer
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic