ibm Rational Rhapsody 7.5 — Creating a component interface

Elements of a component diagram Dependencies A dependency exists when the functioning of one element depends on the existence of another element. A dependency between two components in a component diagram results in an #include statement in the makefile for the dependent (or client) component. Dependencies in component diagrams have the same stereotype values as dependencies created in OMDs. See Dependencies . In a component diagram, a dependency relation is also used in the definition of a component interface. See Creating a component interface for more information. Dependencies appear in the browser under the dependent, or client component.

Component interfaces and realizations An interface between components is a set of operations performed by a hardware or software element in the system. A component realizes an interface if it supports the interface; another component then uses that interface. Interfaces promote design modularity; components are more easily replaceable when they use interfaces instead of directly depending on components. Component interfaces can be seen only in a component diagram. They cannot be viewed in the browser. A component diagram supports only interfaces between components. Creating a component interface To create an interface: 1. Click the Interface icon in the Diagram Tools . 2.

Click once in the diagram, or click-and-drag to create the component interface. 3. By default, Rational Rhapsody creates an interface named Interface_n , where n is an integer value starting with 0. If wanted, rename the interface. The following example shows a component interface. Rational Rhapsody adds the «Interface» stereotype automatically. Rational Rhapsody 857