Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

question from Master Exam 3  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is true or false question from Master Exam 3, Has-a relationships always rely on instance variables. The answer is true.
I think I have read from somewhere and the answer is false because static variable can be counted. Does anybody knows what the correct answer is ? Thanks.
 
Bartender
Posts: 3185
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Huachaitou Peek wrote:This is true or false question from Master Exam 3, Has-a relationships always rely on instance variables. The answer is true.
I think I have read from somewhere and the answer is false because static variable can be counted. Does anybody knows what the correct answer is ? Thanks.



So you have something called- HAS-A and IS-A relationship. Let me explain HAS-A:


So in the above code sample- Person HAS-A Address- This relationship is due to the fact that Person has an instance variable of type Address. So its true that HAS-A relies on Instance variables.

Note: This should have been asked on forum before as well.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!