Einführung in das Wissenschaftliche Arbeiten Andreas Hechenblaickner Programmiersprache Eiffel
Programmiersprache Eiffel Vorstellung der Sprache Besondere Features Entwicklungsumgebung Design by Contract Inhalt
Programmiersprache Eiffel Bertrand Meyer, Jean Marc Nerson Erster Compiler 1985 Entstehungsgeschichte
Programmiersprache Eiffel Objektorientierte Programmiersprache Mehrfachvererbung Automatische Speicherverwaltung Generics Exceptions Portabel durch C-Compiler Features
Programmiersprache Eiffel Wegen Problemen aus vielen Programmiersprachen verbannt Diamond Problem Mehrfachvererbung Lösung: rename, select, export, redefine, undefine Bild: Lars H. Rohwedder, Wikipedia
Programmiersprache Eiffel Hello Eiffel! 01: class 02: HELLO_WORLD 03: 04: create 05: make 06: 07: feature 08: make is 09: -- Writes a nice welcome message to console 10: do 11: io.put_string ("Hello World!") 12: end 13: 14: end
Programmiersprache Eiffel EiffelStudio Integrierte Enwicklungsumgebung für Eiffel Analyse, Design, Implementierung, Tests, Wartung und Dokumentation EiffelEnvision: Plug-In für Visual Studio.NET Gratis für Open Source
Programmiersprache Eiffel Verträge zwischen Softwaremodulen Preconditions Postconditions Class Invariants Design by Contract
Programmiersprache Eiffel 01: class 02: TIME_OF_DAY 03: 04: feature 05: hour: INTEGER 06: minute: INTEGER 07: second: INTEGER 08: 09: feature 10: set_hour (h: INTEGER) is 11: -- Set hour to h 12: -- h must be in the range from 0 to 23 13: do 14: hour := h 15: end 16: 17: set_minute (m: INTEGER) is 18: set_second (s: INTEGER) is 19: end Code: Hal Webre, Eiffel Software
Programmiersprache Eiffel 01: feature 02: set_hour (h: INTEGER) is 03: -- Set hour to h 04: -- h must be in the range from 0 to 23 05: 06: require 07: valid_h: 0 <= h and h <= 23 08: do 09: hour := h 10: ensure 11: hour_set: hour = h 12: minute_unchanged: minute = old minute 13: second_unchanged: second = old second 14: end 15: 16: invariant 17: valid_hour: 0 <= hour and hour <= 23 18: valid_minute: 0 <= minute and minute <= 59 19: valid_second: 0 <= second and second <= 59
Programmiersprache Eiffel Exception wird geworfen Deaktivierbar Ungeeignet für Benutzereingaben Vorsicht bei Nebeneffekten Vertragsbruch
Programmiersprache Eiffel Zusammenfassung Danke für die Aufmerksamkeit!