• 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

separate discriminator inheritance in JAVA?

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


From
Fowler, Martin with Kendall Scott. UML distilled: a brief guide to the standard object modeling language. 2nd ed., 2000, Addison Wesley
p.83
"All subtypes with the same discriminator are disjoint; that is, any instance of the supertype may be an instance of only one of the subtypes within discriminator. A good convention is to have all subclasses that use one discriminator roll up to one triangle, as shown in Fig 6-4. Alternatively, ... "
p.84
"To illustrate, note the following legal combinations of subtypes in the diagram: (Female, Patient, Nurse); ...."


OK, how will we call the inheritance with one separate discriminator per class?
Books on Java or on patterns, illustrated in UML and Java code, frequently show inheritance with "separate discriminator" implying possibility of instances belonging to more than one subtype..
But I cannot understand how in Java I can have simultaneously an instance of a few siblings (it resembles me more a multiple inheritance!)?
 
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic