Präsentation herunterladen
Die Präsentation wird geladen. Bitte warten
Veröffentlicht von:Erhard Dwenger Geändert vor über 9 Jahren
1
Einführung in das Wissenschaftliche Arbeiten Andreas Hechenblaickner Programmiersprache Eiffel 16.01.2007
2
Programmiersprache Eiffel Vorstellung der Sprache Besondere Features Entwicklungsumgebung Design by Contract Inhalt
3
Programmiersprache Eiffel Bertrand Meyer, Jean Marc Nerson Erster Compiler 1985 Entstehungsgeschichte
4
Programmiersprache Eiffel Objektorientierte Programmiersprache Mehrfachvererbung Automatische Speicherverwaltung Generics Exceptions Portabel durch C-Compiler Features
5
Programmiersprache Eiffel Wegen Problemen aus vielen Programmiersprachen verbannt Diamond Problem Mehrfachvererbung Lösung: rename, select, export, redefine, undefine Bild: Lars H. Rohwedder, Wikipedia
6
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
7
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 http://www.eiffel.com
8
Programmiersprache Eiffel Verträge zwischen Softwaremodulen Preconditions Postconditions Class Invariants Design by Contract
9
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
10
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
11
Programmiersprache Eiffel Exception wird geworfen Deaktivierbar Ungeeignet für Benutzereingaben Vorsicht bei Nebeneffekten Vertragsbruch
12
Programmiersprache Eiffel Zusammenfassung Danke für die Aufmerksamkeit!
Ähnliche Präsentationen
© 2024 SlidePlayer.org Inc.
All rights reserved.