Presentation is loading. Please wait.

Presentation is loading. Please wait.

Principles of Object-Oriented Software Development The language Eiffel.

Similar presentations


Presentation on theme: "Principles of Object-Oriented Software Development The language Eiffel."— Presentation transcript:

1 Principles of Object-Oriented Software Development The language Eiffel

2 Introduction Terminology Expressions Control Objects Inheritance Techniques Summary

3 Eiffel -- a language with assertions bottom-up development -- class design contracts -- specify client/server relationships Design principles -- correctness static typing -- type secure multiple inheritance -- polymorphism dynamic binding -- refinement generic classes -- abstraction

4 The language Eiffel class -- a model for a set of objects feature -- attribute, function, procedure export -- interface declaration inherit -- class inclusion and subtyping (!) redefine, rename -- to change inherited features deferred -- to postpone the implementation require, ensure, invariant -- assertions keywords

5 Type expressions basic types -- Boolean, Integer formal parameter types -- Array[T], List[T] class types -- user-defined anchored types -- like current conformance Value expressions arithmetic, comparison, method evaluation -- o.m(...) Assignment var := expression

6 Control branching -- if... then... elsif... else... End iterations -- from... until... loop... end method refinement Eiffel -- control

7 class counter export inc val feature count : Integer create is do count := 0 end inc( n : Integer ) is require n > 0 do count := count + n ensure count = old count + n end val : Integer is do Result := count end invariant count >= 0 end -- class counter Eiffel -- objects

8 Multiple inheritance class Fixed_List[T] export... inherit List[T] Array[T] feature... end Eiffel -- inheritance

9 Rename and/or redefine class C export... inherit A rename m as m1 redefine p B rename m as m2 redefine q feature... end Eiffel -- techniques

10 The language Eiffel design principles -- correctness terminology -- keywords syntax -- type conformance control objects -- counter example inheritance -- renaming, redefining


Download ppt "Principles of Object-Oriented Software Development The language Eiffel."

Similar presentations


Ads by Google