Design: Inheritance and Interface Notation System
Focus on notation and diagram representation of inheritance and interfaces. Implementation details of classes or methods are out of scope.
Functional Requirements
Non-Functional Requirements
+----------------+ +----------------+
| <<abstract>> | | <<interface>> |
| Animal | | Movable |
|----------------| |----------------|
| +eat() | | +move() |
+-------^--------+ +-------^--------+
| |
| inherits | implements
+-------+--------+ +-------+--------+
| Dog | | Car |
|----------------| |----------------|
| +bark() | | +drive() |
+----------------+ +----------------+<|-- represent in system design diagrams?<|-- is used to show inheritance in system design diagrams.<|.., not <|--.<|-- [OK]<|--<|.. from class to interface.Class <|.. Interface is correct.Class <|.. Interface -> Option B<|.. from class [OK]interface IAnimal class Dog <|.. IAnimal class Labrador <|-- Dog
<|.. from Dog to IAnimal.<|-- from Labrador to Dog.class Vehicle <|.. Car interface Drivable <|-- Vehicle
Vehicle <|.. Car means Vehicle implements Car, but Car is a class, not an interface, so this is invalid.Drivable <|-- Vehicle means Drivable inherits Vehicle, but Drivable is an interface and Vehicle a class, so invalid.Smartphone inherits from Device and implements two interfaces: Camera and GPS. Which UML notation correctly represents this?<|-- points from Smartphone to Device: Smartphone <|-- Device.<|.. point from Smartphone to each interface.Smartphone <|-- Device Smartphone <|.. Camera Smartphone <|.. GPScorrectly shows inheritance and interface implementation directions.
Pass the test and this pattern moves unknown