==== Einführung ==== Point of the course: Giving an idea of how to model properly, not actually teaching you how to do everything. * Software: Is the program/code and everything surrounding it, aka internal strukture of the machine, other softwares that it communicates with, and hardware. * UML: Modelling language for software, see blueprints. * Modelling: Simplification and abstraction of a program code. * Design pattern: generalized ideas and solutions to specific types of problems. * Software engineering: Producing and //maintaining// software. Developing software: Waterfall model vs Iterative and Incremental Developement. ==== Notes ==== DURING THE EXAM: You will be asked to translate UML to Java Code. Do not write out the complete code, just write a //skeleton// to show you understand what the diagram is about. \\ See Skript 2.2.7 for an example of this. ===== Aggregation/Komposition ===== ^ Aggregation ^ Komposition ^ | Muss etwas haben | Muss etwas haben | | Kann ausgetauscht werden | Kann ausgetauscht werden | | ??? | container wird Zerstört => teile werden zerstört \\ (Hut für garbage collection) | ===== Diagramme ===== * Klassendiagramm * Objektdiagramm * Sequenzdiagramm * Kommunikationsdiagramm * Aktivitätsdiagramm * Zustandsdiagramm ===== Object oriented analysis (Design Model) ===== - Use Case Analysis - Aktoren finden - Use Cases finden - Use Case Diagramm zeichnen - Use Cases beschreiben - Static Model Creation - Identify classes - Nomen finden - Mist löschen - Fehlendes hinzufügen - Identify associations - Assoziationen finden - Mist löschen (z.B. Redundanzen) - Fehlendes hinzufügen - Miltiplizitäten und Rollen hinzufügen - Identify attributes * Keine Typen * Keine Objekte, statdessen Assiziationen - Identify inheritance * Auch Klassen abstrakt machen - Restructure the model - Modelling of Interactions * Sequenzdiagramm pro Primerszenario/Sekunderzenarien - Creation of State and Activity Diagrams * Nur für "interesante" Klassen - Primary scenario.Klassen lebenslinie -> State machine (''do/...Acritity()'' (active state), stable state)) - secondary scenarios einbauen - Aktivitätsdiagramme für jede do-activity zeichnen - Restructure the model ===== Software Engineering ===== - Object Design (from design model) - Add operation * From sequenz diagram * From state diagram * transitionen * do-Activities * Constructors * Setters/Getters - Add directions - Access rights (Attribute private!) - Mehrfach vererbung auflösen * Interfaces * Proxy - Klassen (libs) wiederverwenden * Delegation * Vererbung - Implemnetierung von state diagrams (erweitern der object desgign) * Prozedural (alle States in einer Funktion) * Fallunterscheidung * Funktion pro Event * Funktion pro do-Activities und Event * Stabile zustände in enum * State object (siehe entwurfsmuster (objekt an state machine übergeben!)) * State machine * Klassen * Kontext * State * Transition * Activity (abstrkt) * Konkrete aktivities * State kann pro event eine transition haben * Transition hat eine activity * Transition kann pro return wert der Activity einen next state haben - System design * Hohe Koherenz & Geringer zusammenhang (Model/View-TRennung => Observer) * Paketdiagramme zeichnen * Komponentendiagramme zeichnen * Layer Architektur (z.B. 3 Stufig für GUI + Services) * Facade pattern - GUI