• 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

Doubt on K&B Self-Test Chapter 2 Question 1

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Self-Test Answers here state that

"Has-a relationships always rely on instance variables" is correct.

Does this mean that in the exam I have to count static (class) variables as instance variables?
[ August 31, 2008: Message edited by: Kat Freudenkinder ]
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think that Has-A relationship comes under static fields. Because If you say a Dog Has-A Nose, then every instance of Dog must have a nose. You can't say that every dog shares the nose....
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kat Freudenkinder:
The Self-Test Answers here state that

"Has-a relationships always rely on instance variables" is correct.

Does this mean that in the exam I have to count static (class) variables as instance variables?

[ August 31, 2008: Message edited by: Kat Freudenkinder ]


you shoud understand what is instance variables and what is Class varibles
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic