Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drag & Drop: what about the order of elements to place within the code fragment?

 
Ulrich Vormbrock
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

revising the exercises from Chapter 6, page 530-531, K&B 6, I noticed that (theoretically) it should be possible to place the elements in different ways ... so in my opinion there is no absolute uniqueness concerning the solution.

Let's consider the following cases (from K&B Self Tests):

1) Try-catch-Block: it's also possible to surround with try/catch ONLY the piece of code (for example "file.createNewFile()") which really throws the exception, instead of surrounding the entire block.
2) Imports: the order of imports doesn't matter (import java.util.*; import java.text.* is the same as import java.text.* and java.util.*).

What about the real exam?
Does the order (into which I drag the elements) affect my score?
Is the "machine" lenient enough, taking into account that there might be not only one solution - provided that I use the minimum of slots?

 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there are any questions requiring you to put imports in a drag and drop questions, then most likely there will be a single import to put. If indeed there are multiple imports to fill, then the order won't matter. If you are asked to put try-catch around some code, then there won't be two spots where you can put the try-catch statements. Generally there are no extra blanks which are leftover after you fill the required code, so you won't have a condition where you can put a try-catch block around a single statement or a group of statements. You'll have only enough blanks so that you can put the try-catch at one place...
 
Ulrich Vormbrock
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankit,

thank you very much for your answer!
Yes, it's sounds rather logical as you've described ... so I can breathe a sigh of relief and address myself to the very important things concerning exam cram!

Cheers!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic