permaculture playing cards*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes SCJP Java 6 Study Guide (Sierra, Bates) Question format and answer... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "SCJP Java 6 Study Guide (Sierra, Bates) Question format and answer..." Watch "SCJP Java 6 Study Guide (Sierra, Bates) Question format and answer..." New topic
Author

SCJP Java 6 Study Guide (Sierra, Bates) Question format and answer...

Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
Hello,
New to the JavaRanch. I hope this is the proper forum for this question.
I've been a long time Java Developer and thought I'd make it official by finally getting my cert.
I'm working through the study guide mentioned in the subject and had a question pertaining to both the format of the question and the resulting answer to said question in the Self Test section of Chapter 2.
Specifically question #4. Essentially it has two incomplete class blocks, and asks to complete for viability so it will compile and has a table of "Fragments" that may or may not be used.

The answer in the book implies that you need to define 1) a default cstor in the AgedP class while 2) calling it via the super(); accessor in the subclasses cstor that takes an int.
My own answer was doing this:



Reading the question back over a multiple of times it's not clear to me whether there's something special about the given table that requires me to use which would make my answer incorrect? Instructions for both the slots and fragments imply that they may not be used at all, I think, right?

thanks,
K2


[SCJP 6]
[SCBCD in process]
Sachin Adat
Ranch Hand

Joined: Sep 03, 2007
Posts: 213
Hi Karl,
Welcome to JavaRanch
This is the proper forum for your question.
Before I try to answer your question please have a look at the FAQs and this one especially Use Real Words
Secondly, try to ask the question in such a way that anyone can answer the question(even those who don't have the books).
You don't expect everyone to have the K&B SCJP 6 quide......... or do you? atleast not the latest edition
Believe me I had to open the book to answer your question....
There are many gurus here who could have answered your answer sooner than later, if you ask the questions in the proper way.
Now, answering the question.
This is a type of drag and drop question(I guess, I haven't given the exam till now).
Karl Krasnowsky wrote:
My own answer was doing this:


Adding super(x).......can't do it.
From the book......
As there is no droppable tile for the variable x and the parentheses(in the Kinder Constructor), are already in place and empty, there is no way to construct a call to constructor.

I don't know how to explain it better.......
Karl Krasnowsky wrote:
Reading the question back over a multiple of times it's not clear to me whether there's something special about the given table that requires me to use which would make my answer incorrect?

Yes, the special thing is there is no droppable tile for the variable x.
You have to give the answer with all that you have(available fragments in the table).
Karl Krasnowsky wrote:Instructions for both the slots and fragments imply that they may not be used at all, I think, right?

Right
From the book......
Fragments: Use the following fragments zero or more times.

zero makes your implications perfectly right......
Regards,


SCJP 6
How To Ask Questions On Java Ranch - How To Answer Questions On Java Ranch
Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
Thanks Sachin,
Yes, the special thing is there is no droppable tile for the variable x.
You have to give the answer with all that you have(available fragments in the table).


there's the answer I was looking for. Thanks! I would have phrased this question in a manner that was more generic, but other then manufacturing the entire question and answer verbatim (which may be illegal?) I couldn't see such a way except to refer to the book directly. Maybe I should have headed the message with

For those who have a copy of the SCJP Java 6 Study Guide (Sierra, Bates)

but I thought I had that covered in the subject line.
It wasn't a Java question per se, but a question directly having to do with a format style in the book itself.

thanks again,
Karl
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8801
    
    5
Hey Karl,

Welcome to the ranch!

First off, the general policy here is that it's fine to post small pieces of copyrighted content, but always mention the source! So, for instance it is completely fine to post an entire mock question and say this is from K&B or wherever.

Second - this probably isn't one of our best questions - we tried a couple of things in the book to emulate the real exam's drag and drop questions, but it's not easy to convey how these really work. You will often encounter D&D questions where you might get to reuse fragments, and you'll get some where you cannot reuse fragments. Also, sometimes you might get a question where some of the slots can be filled with some sort of null entry (like a comment).

hth,

Bert


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
Cool , BB is in the house!
Hey, thanks for the feedback. Good to have the background on where this comes from so I can better conceptualize it.
hth,

yep, pretty much laid this one to rest.

thanks again,
K2

 
Consider Paul's rocket mass heater.
 
subject: SCJP Java 6 Study Guide (Sierra, Bates) Question format and answer...
 
Similar Threads
SCJP Study Guide 6 question
K&B 5.0, Chapter 2, Question 7, Drag N Drop
K&B 1.5 Chapter 2 Object Orientation Self Test Query
Not convinced with K&B solution for couple of questions, please help
K&B SCJP 5...Chap2..Que 7