1 / 4

Erstellen Sie das Zustandsdiagramm für einen Getränkeautomaten Preis pro Getränk: 1,50 €

4. Übungsaufgabe 1: Getränkeautomat. Erstellen Sie das Zustandsdiagramm für einen Getränkeautomaten Preis pro Getränk: 1,50 € Geldstücke: 0,50 €; 1 €; 2 € Quelle: http://www.uni-karlsruhe.de/~za268/inf_seminar/automaten.html. Legende:. Anfangszustand. €. Endzustand. Zustand.

elani
Télécharger la présentation

Erstellen Sie das Zustandsdiagramm für einen Getränkeautomaten Preis pro Getränk: 1,50 €

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 4 Übungsaufgabe 1: Getränkeautomat Erstellen Sie das Zustandsdiagramm für einen Getränkeautomaten Preis pro Getränk: 1,50 € Geldstücke: 0,50 €; 1 €; 2 € Quelle: http://www.uni-karlsruhe.de/~za268/inf_seminar/automaten.html Legende: Anfangszustand € Endzustand Zustand Zustands-übergang €

  2. Wert = 0,5 € Wert = 2,0 € Wert = 1,0 € Wert = 1,5 € Wert = 2,5 € Wert = 3,0 € 5 Übungsaufgabe 1: Lösung: 2,0 € einzahlen 0,5 € einzahlen 1,0 € einzahlen 1,0 € einzahlen 2,0 € einzahlen 0,5 € einzahlen 2,0 € einzahlen 0,5 € einzahlen 1,0 € einzahlen Flasche ausgeben 1,5 € auszahlen Flasche ausgeben 0,0 € auszahlen Flasche ausgeben 1,0 € auszahlen Flasche ausgeben 0,5 € auszahlen

  3. Auftrag erhalten 6 Übungsaufgabe 2: Größter gemeinsamer Teiler Erstellen Sie ein Aktivitätsdiagramm, um den größten gemeinsamen Teiler (ggT) für zwei natürliche Zahlen m und n zu ermitteln. Hinweis: Für zwei natürliche Zahlen m, n gilt: ggT(m,n) = ggT(m-n,n) , m > n ggT(m,n) = ggT(n-m,m), n > m ggT(m,n) = n , m = n Legende: Anfangszustand Entscheidung Reihenfolge Endzustand [x > 0] [x < 0] [x = 0] Aktivität

  4. m = m - n m = h - m n = m h = n Ausgabe: n ist GGT 7 Übungsaufgabe 2: Lösung Für zwei natürliche Zahlen m, n gilt: ggT(m,n) = ggT(m-n,n) , m > n ggT(m,n) = ggT(n-m,m), n > m ggT(m,n) = n , m = n [n > m] [m > n] [m = n]

More Related