*
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
|
Flagged Topics
|
Hot Topics
|
Zero Replies
Register / Login
JavaRanch
»
Java Forums
»
Certification
»
Programmer Certification (SCJP/OCPJP)
Author
K&B 5.0, Chapter 2, Question 7, Drag N Drop
Rupak Khurana
Ranch Hand
Joined: Mar 01, 2005
Posts: 89
posted
Jan 17, 2006 09:11:00
0
7. Using the fragments below, complete the following code so it compiles. Note, you may not have to fill all of the slots. Code: class AgedP { __________ __________ __________ __________ __________ public AgedP(int x) { __________ __________ __________ __________ __________ } } public class Kinder extends AgedP { __________ __________ __________ _________ ________ __________ public Kinder(int x) { __________ __________ __________ __________ __________ (); } } Fragments: Use the following fragments zero or more times: AgedP super this ( ) { } ;
I came out with the following answer which is correct but the answer in the book doesnot have the "this()" statement. How will SUN grade such a response, do they try to compile the code or just match it against their code ? . As SUN sees it, is my answer right (since it compiles) or wrong (since it doesnot match a particular answer) ?
class AgedP { AgedP(){} public AgedP(int x) { this(); //The answer in the book does not write this line. } } class Kinder extends AgedP { public Kinder (int x ){ super(); } }
SCJP 1.5<br />SCWCD 1.4
Andrew Shumway
Greenhorn
Joined: Jan 05, 2006
Posts: 18
posted
Jan 17, 2006 12:56:00
0
You're right. The drag and drop questions in the book can have multiple correct answers. I dont' think that was intended and it worries me that the
test
will have simmilar oversites. Unfortunatly, we will never know since the test doesnt' tell us what we missed and what the "correct" answer is.
You'll find a couple other small typos in the book. Ch 6 question 8 answer C doesn't use the typical type face for 'Currency' (a class not mentioned in the chapter. Question 7 of the same chapter fails to note that a File can be created with new File(
String
parentDir, String fileName) as well as File(File parentDir, String fileName. I've got another posting out regarding Ch 7 question 16. The 'correct' answers show the same compile error as one of the incorrect answers...
All in all the book is fairly clean though. It's the exam on the CD that's loaded with typos, errors, bugs etc. Close to 10% of the questions have prolems. One even scores you wrong if you answer C, shows the mistake and explains that C is the correct answer. I think the only reason the CD is in there is to make it more difficult to return the book.
cheers
--andrew
Bert Bates
author
Sheriff
Joined: Oct 14, 2002
Posts: 8829
5
posted
Jan 17, 2006 15:45:00
0
Hey Rupak and Andrew,
The Sun exam engine doesn't actually compile your drag and drop code. In some cases a drag and drop question will have several correct answers, and if you create ANY of the correct answers you will be given full credit.
As far as the book goes, I'm traveling for a few days and don't have the book with me, so I'll look into your concerns when I return. I will say though that drag and drop questions won't always supply you with the components you need to create EVERY legal solution, but they will provide you with enough components to create at least one legal solution. So, if their is one good answer, the question doesn't have to provide you with ALL legal answers the API might provide.
As far as the CD goes, we have had some problems with the vendor, so any details you can give us will help us to fix the specific problems AND also to help us get some leverage on the exam engine vendor so that we can improve the quality of that product. Unfortunately, this is an area where we don't get final control on the content, so your feedback will help us try to change that!
I think the only reason the CD is in there is to make it more difficult to return the book.
Ouch Andrew! I gotta tell you that we put a lot of effort into ALL of the exam questions we created for the book, and that we consider the CD exam and the web site exam to be a key part of the value of the book - so if there are errors we want to know about them and fix them ASAP!
Thanks!
Bert
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
I agree. Here's the link:
subject: K&B 5.0, Chapter 2, Question 7, Drag N Drop
Similar Threads
SCJP Study Guide 6 question
K&B 1.5 Chapter 2 Object Orientation Self Test Query
Doubt in K&B pg:167,Q:7
Sierra Bates Book CH2 Q7
K&B SCJP 5...Chap2..Que 7
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
JForum
|
Paul Wheaton