• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Applet Class Question

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IBM's Certification exam tool has stumped me on the following. (Unless their answer is an error). Please post any alternative answers.
First, here is what I think. I believe only answer "C" is correct, because:
A)Applet doesn't implement the ContainerListener interface (no componentAdded() or componentRemoved() methods)
B) Applet extends from Panel, not Frame
C) Applet extends indirectly from Component; Container extends directly from Component, Panel extends from Container, and Applet extends directly from Panel.
D) Applet doesn't impelement the Runnable interface since it ain't got no run()
E) none of the above is wrong since (I think!) C is correct.
Now that you know what I think, here is the question:
-----------------------------------------------------
Applets implement behavior in the container class because Applets:
MULTIPLE CHOICE
[] (A) Implement the ContainerListener interface
[] (B) Extend the Frame class
[] (C) Indirectly extend the Component class
[] (D) Implement the Runnable interface
[] (E) None of the above
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To tell you the truth I don't understand the question myself but if I had to guess (!?) none of the above but it is too ambiguous, especially the phrase "implement behavior". I saw it too in the IBM mock exam if I am not mistaken... Sorry!
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the post, Tony. There is some consolation knowing you don't get it either. (p.s. It was from IBM's mock exam)
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd say it's definitely E. The probelm with C is that while the statement is true by itself, it has nothing at all to do with the statement "Applets implement behavior in the container class because Applets...". Indirectly extending the Component class does not explain anything. Lots of classes extend Component without behaving like containers. The reason Applets behave like Containers is that they indirectly extend the Container class (via Panel). But none of the answers mention this, so E is the only option.
 
reply
    Bookmark Topic Watch Topic
  • New Topic