next up previous contents
Next: Packages: Example Up: Interfaces Previous: Interfaces

Commentary

Interface: a collection of operations used to specify a service of an abstraction. Each operation will have pre-conditions and post-conditions. Also there will be invariants unaffected by each operation. OCL can be used to specify the semantics of interfaces. State machines may be used to determine legal partial ordering of an interface's operations. Collaborations will determine the expected behaviour of an interface. Interface implemented by a class. The objects of an implementing class will have methods that provide the operations in the interface. An implementing class may realize more than one interface. Also one or more interfaces of a class may be used by different roles which will have some of the interface operations. Different roles correspond to different selection of interfaces supported by the class. There may be many implementations of the same interface. Objects use interfaces which have been implemented. Dependency relationship between the interface user object and the interface. <<interface>> stereotyped class with operation used shown explicitly instead of lollipop icon. Generalisation / specialisation diagram with <<interface>> stereotyped class is used to include interface hierarchy.



Ananda Amatya
11/3/1999