Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

Sorting Information Picture: Cardiff University. Enthältbeziehung We have already talked about the fact that object may contain other objects. If we generally.

Ähnliche Präsentationen


Präsentation zum Thema: "Sorting Information Picture: Cardiff University. Enthältbeziehung We have already talked about the fact that object may contain other objects. If we generally."—  Präsentation transkript:

1 Sorting Information Picture: Cardiff University

2 Enthältbeziehung We have already talked about the fact that object may contain other objects. If we generally talk about classes (text documents in general can contain paragraphs) then we draw a class diagram (class are written in capital letters):

3 Object diagram If you write about a specific object, you draw a object diagram IT.docx (TEXTDOCUMENT) Objects (PARAGRAPH) Pixels (PARAGRAPH) Diagrams (PARAGRAPH)

4 Tree Diagrams (Object diagram) Globe Europe Germany Berlin Munich Britain London Asia China Beijing Japan Tokyo Kyoto Root node Leaf node Edge A parent node can have several child nodes. But every child node only has one parent.

5 Tree Diagrams (CLASS diagram) Now we want to draw more complicated diagrams. We call these CLASS diagrams tree diagrams:

6 Exercise 1 Sportarten Ballspiele Fußball Handball Golf Basketball Volleyball Tanzen Moderner Tanz Walzer Rock `n` Roll Wintersport Ski-Slalom Skispringen Snowboard Leichtathletik 100-m-Lauf Weitsprung

7 Folders (Ordner) What does this have to do with computers? Well, you should sort your files in folders. Folders are very special objects, because they can contain objects of their own CLASS.

8 Folders (Ordner) Exercise: Hanna hat Teile ihrer Hausaufgaben in digitaler Form auf einem USB- Stick im Ordner Schule wie folgt geordnet: Der Ordner Schule enthält die Ordner Informatik und Biologie. Im Ordner Informatik befinden sich die Dateien Schneemann, Spielplatz und Gedicht sowie der Ordner Projekt mit den Dateien Wirbeltier und Krokodil; der Ordner Biologie enthält die Datei Vogel. Zeichne zur beschriebenen Ordner- und Dateistruktur das Objektdiagramm und das Klassendiagram.

9 Folders (Ordner) Schule (ORDNER) Informatik (ORDNER) Schneemann (DATEI) Spielplatz (DATEI) Gedicht (DATEI) Projekt (ORDNER) Wirbeltier (DATEI) Krokodil (DATEI) Biologie (ORDNER) Vogel (DATEI) Objektdiagramm Klassendiagramm

10 Dichotomous Key (Bestimmungsbäume)

11 Start Backbone Wings Feathers Bird Hair Bat No Wings Legs Turtle Frog No legs Snake No Backbone Antenna Insect No Antenna Spider

12 Bestimmungsbäume, Worksheet Start Mit Schwanz Schwanz abgeplattet Mit Rückenkamm Kammmolch Ohne Rückenkamm Bergmolch Schwanz rund Flecken/Streifen Feuersalamander Einfarbig Alpensalamander Ohne Schwanz Warzige Haut Erdkröte Glatte Haut Ohne Schwimmhäute Laubfrosch Mit Schwimmhäuten Grasfrosch

13 Paths We can write the path needed to get to an object: Superordinate object/subordinate object or Superordinate object.subordinate object Globe Europe Germany Berlin Munich Britain London Asia China Beijing Japan Tokyo Kyoto So based on the tree diagram to the right, the path to Munich is Globe.Europe.Germany.Munich Exercise: Write down the path tp „Kreutzkröte“ on p. 70 in Ikarus.

14 Punktnotation Motivation: we want to write the things that you have already learned in a way that resembles computer code.

15 Attributes Consider the box below. Let us call this object box1. The box has several attributes, and we write this in the following way Objectname.attribute = attribute value So for instance box1.fillingcolor = red box1.edgecolor = blue box1.length = 5 cm box1.height = 10 cm

16 CLASSES The object box1 is in the class RECTANGLES (classes are written with capital letter). If you want to denote the class you may write Objectname: CLASS attribute = attribute value So for instance box1: RECTANGLES fillingcolor = red edgecolor = blue length = 5 cm height = 10 cm

17 Methods Methodes are properties that are shared among objects of the same class. Say, we can change the filling color of RECTANGLES. We can call this methode SetFillingColor. We write Objectname.Methodename(new attribute value) So for instance box1.SetFillingcolor(yellow)


Herunterladen ppt "Sorting Information Picture: Cardiff University. Enthältbeziehung We have already talked about the fact that object may contain other objects. If we generally."

Ähnliche Präsentationen


Google-Anzeigen