• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

K&B Mock exam doubt

 
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Following are true statements in the master exam of K&B

1) is-a relationships always rely on inheritance.
2) is-a relationships always require at least two class types.


Statement 1 I feel is incorrect because K&B pg# 90 IS-A description which states that is-a can be through classes or interfaces.

Interfaces are not part of inheritance tree, so I am confused how 1) is correct.

Statement 2 can be correct based on the belief that interfaces are also class types.

Please let me know what you think about the two statements.

Thanks,
Megha
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by megha joshi:
... Please let me know what you think...


I think you are correct, unless there is a definition of "IS-A" that I'm not aware of.
 
megha joshi
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Marc!!
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How would you guys feel if the word "always" were changed to "typically" for both answers?
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bert Bates:
How would you guys feel if the word "always" were changed to "typically" for both answers?


Sounds good!

(I think the word "always" prompts people to look for a counterexample.)
 
Ranch Hand
Posts: 274
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bert Bates:
How would you guys feel if the word "always" were changed to "typically" for both answers?




Ya Bert,

now it sounds and FEELS much better to understand.

Regards,
Gitesh
reply
    Bookmark Topic Watch Topic
  • New Topic