• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A superclass of three objects walked into a bar and

 
John Meyer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of the practice questions in the otherwise formidable OCA SE8 study guide. While the practice quiz shows option B as true, I think it's likely on the real exam it would be false. The question appears to be getting at distinctions of classes and objects.



B is not true because:

1. Objects are bytecode, instantiated in memory. Classes are recipes for building objects.
2. Methods can be passed the following: 1) references to in-memory objects 2) primitives, 3) null values. Class types may be specified as parameters, but classes may not be passed as parameters. [Reflection would be a possible exception to this statement, but would not go anywhere to resolving the other issues.]
3. Objects cannot serve as superclasses because classes, not objects, are what provide inheritance and other polymorphic features.

I think it could be correct if it were reworded as follows:

B. If a method defines a parameter for a superclass that has three subclasses, then instances of any of those three may be passed to the method.


oca-q.jpg
[Thumbnail for oca-q.jpg]
 
Thomas Gard
Greenhorn
Posts: 27
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Regardless, the phrasing is horrendous.

If they intention is what I think it is, then they're doing a all-too-familiar conflation of the terms "object" and "class".
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

First of all, a warm welcome to CodeRanch!

John Meyer wrote:I think it could be correct if it were reworded as follows:

B. If a method defines a parameter for a superclass that has three subclasses, then instances of any of those three may be passed to the method.

I think you are correct. In my opinion it's a valid remark and option B should be reprashed a little. I passed your remark to one of the authors of the OCA8 study guide.

Kind regards,
Roel
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel,
Thank you for posting. I wanted to see what someone else said before I weighed in.

I think the question could have been phrased better as well. That said, the real exam tells you how many answers are correct. If answers there are borderline correct, choosing the best answer becomes an important skill.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:I think the question could have been phrased better as well. That said, the real exam tells you how many answers are correct. If answers there are borderline correct, choosing the best answer becomes an important skill.

With the current answer options, I would doubt about B and definitely select C.

I wonder why answer C is incorrect. I have a method which takes a java.lang.Object parameter and I can pass any reference variable to this method...


Kind regards,
Roel
 
John Meyer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:I wonder why answer C is incorrect.


Good catch. C actually is correct per the test app. If you miss any part of a question, the app puts a red x next to all your answers, including the correct ones.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Meyer wrote:C actually is correct per the test app. If you miss any part of a question, the app puts a red x next to all your answers, including the correct ones.

I didn't know that as I'm not yet familiar with this exam software. This will change once my book copy is delivered

But according to the original post answer B is correct as well, but in the screenshot there's no red x next to answer B. So the user interface seems a bit misleading/confusing to me: from this screenshot I can't see with a glance which answers I should have selected to answer this question correctly (and thus which are the correct answers)...
 
John Meyer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote: user interface seems a bit misleading/confusing to me


You have to show a modal dialog to see the answers... which hides the question. The UX is work in progress, but it's better than the tool that ships with the SE7 guide. Being web based maybe they can make corrections.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Meyer wrote:The UX is work in progress, but it's better than the tool that ships with the SE7 guide. Being web based maybe they can make corrections.

I agree online exam software comes with some great benefits. The most important one is you can easily apply fixes and corrections (as shown by Enthuware for example).

I assume you are referring to the practice exams of the K&B7 study guide. I don't have real complaints about the UX of the practice exams. I especially likethe grade exam page: you clearly see which questions were (in)correct, you have a very straightforward indication of which answers you had to select to answer the question correctly and you have the explanation of the correct answers at the bottom.
k&b7-practice-exams.jpg
[Thumbnail for k&b7-practice-exams.jpg]
 
John Meyer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
John Meyer wrote:The UX is work in progress, but it's better than the tool that ships with the SE7 guide. Being web based maybe they can make corrections.

I agree online exam software comes with some great benefits. The most important one is you can easily apply fixes and corrections (as shown by Enthuware for example).

I assume you are referring to the practice exams of the K&B7 study guide. I don't have real complaints about the UX of the practice exams. I especially likethe grade exam page: you clearly see which questions were (in)correct, you have a very straightforward indication of which answers you had to select to answer the question correctly and you have the explanation of the correct answers at the bottom.


Yeah - UX is actually ahead of sybex site, except in my case, because on the 7 guide, the Adobe installer failed.

 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Meyer wrote:Yeah - UX is actually ahead of sybex site, except in my case, because on the 7 guide, the Adobe installer failed.

If you experienced problems while installing the practice exam software from K&B7, this thread might be helpful.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic