• 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

quick question on java interface.

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how do we model a java interface in UML class diagram?
is it a generalization? association? other...
cheers.
 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(1)
An interface is used to implement multiple inheritance in Java.
(2)
The UML modeling is similar to Generalization. Generalization is modeled with a line that has an open arrow pointing from the subclass to the superclass. An interface is shown with a dashed line that has an open arrow pointing from the class that implements the interface toward the interface.
Here's a simplified class diagram that shows the interface IsList being implemented by the class SortNames.
The dashed line with the simple arrow pointing from SortNames to TextFileIn represents an include relationship.


[This message has been edited by Michael Pearson (edited August 01, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic