• 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

Is A and Has Relationship

 
Ranch Hand
Posts: 598
3
jQuery Google App Engine Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there , Good Morning I need an example of Is-a and has-a relationship which uses complex class hierarchy with association , dependency and inheritance. I am not requesting a program here but only text example. If provided , I will try to convert it to a class diagram and after that into a java program. Although , I have one doubt regarding class diagram , when do we use "*" in class diagram ? what this "*" represents ?

best regards,
 
Saloon Keeper
Posts: 15510
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why does the hierarchy need to be complex? This is in general a bad idea.

Anyway, a Car IS-A Vehicle, and a Car HAS-AN Engine.

The asterisk means that one type is associated with zero or many of another type. For instance, a Tree can have many many Leafs, but in the winter it can also have zero. Search UML on the web.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic