File:150€-Automat.svg

Summary

Description Ein didaktisches Gedankenexperiment, welches das Geheimnisprinzip in der objekt-orientierten Programmierung illustriert.
Der Automat spuckt einen 150€-Schein aus, wenn er mit einem 50€-Schein gefüttert wird, solange er betriebsbereit ist. Ist er dagegen im Wartungsmodus, muß ein Service-Mitarbeiter angerufen werden, der die braune und die lila Kartusche austauscht, um die Funktionsfähigkeit des Automaten wiederherzustellen.
Der Gedanke dabei ist, Lerner über das Funktionsprinzip der fiktiven Maschine spekulieren zu lassen, da unklar bleibt, ob zum Beispiel die lila Kartusche Farbe enthält mit der der 50€-Schein überdruckt wird, oder ob nicht doch die braune Kartusche alle echten Fünfziger sammelt und stattdessen aus der violetten vorbereitete Fälschungen ausgegeben werden …
Date 16:40, 5 February 2021 (UTC)
Source Own work
Author Chrkl
Other versions

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#150€-Automat.svgCategory:Self-published work
Category:Object-oriented design Category:Teaching illustrations of computer science
Category:CC-BY-SA-4.0 Category:Object-oriented design Category:Self-published work Category:Teaching illustrations of computer science