Win a copy of Microservices Testing (Live Project) this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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