@startuml class ShortestPathAlgorithm{ - protected abstract ShortestPathSolution doRun(); } class BellmanFordAlgorithm { - public class BellmanFordAlgorithm extends ShortestPathAlgorithm } class ShortestPathObserver { - public void notifyOriginProcessed(Node node); - public void notifyNodeReached(Node node); - public void notifyNodeMarked(Node node); - public void notifyDestinationReached(Node node); } class ShortestPathSolution { + private final Path path; } class ShortestPathTextObserver { + private final PrintStream stream; - public ShortestPathTextObserver(PrintStream stream); - public void notifyOriginProcessed(Node node); - public void notifyNodeReached(Node node); - public void notifyNodeMarked(Node node); - public void notifyDestinationReached(Node node); } class AbstractAlgorithm { + protected final AbstractInputData data; + protected final ArrayList observers; } class DijkstraAlgorithm { } class AStarAlgorithm { } class AbstractInputData { + public enum Mode; + private final Graph graph; + protected final ArcInspector arcInspector; } class BinaryHeap { + private int currentSize; + protected final ArrayList array; } BellmanFordAlgorithm <|-- ShortestPathAlgorithm : extends ShortestPathSolution <|-- ShortestPathObserver : extends ShortestPathTextObserver <|-- ShortestPathObserver : extends DijkstraAlgorithm <|-- ShortestPathAlgorithm : extends AStarAlgorithm <|-- DijkstraAlgorithm : extends ShortestPathAlgorithm <|-- AbstractAlgorithm : extends @enduml