Principles of Object-Oriented Software Development The language Eiffel.

Slides:



Advertisements
Similar presentations
Type Systems and Object- Oriented Programming (III) John C. Mitchell Stanford University.
Advertisements

© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 1: Eiffel Introduction.
Chair of Software Engineering CAT calls (Changed Availability or Type) these slides contain advanced material and are optional.
Chair of Software Engineering 1 Introduction to Programming Bertrand Meyer Exercise Session November 2008.
Inheritance 2 Ranga Rodrigo Based on Mark Priestley's Lectures.
Inheritance. class RECTANGLE inherit POLYGON RECTANGLE includes features of POLYGON r: RECTANGLE; p: POLYGON Polymorphism p := r -- legal assignment Dynamic.
Eiffel Programming Language. Chad Frommeyer CSC 407/507 Fall 2005 Dr. Richard Fox.
Principles of Object-Oriented Software Development The language Smalltalk.
Chair of Software Engineering OOSC Summer Semester Object-Oriented Software Construction Bertrand Meyer.
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
1 Scheme Scheme is a functional language. Scheme is based on lambda calculus. lambda abstraction = function definition In Scheme, a function is defined.
Principles of Object-Oriented Software Development Behavioral refinement.
Principles of Object-Oriented Software Development The language Java.
Chair of Software Engineering ATOT - Lecture 8, 28 April Advanced Topics in Object Technology Bertrand Meyer.
Chair of Software Engineering OOSC Summer Semester Object-Oriented Software Construction Bertrand Meyer.
C. Varela; Adapted from S. Haridi and P. Van Roy1 Object-Oriented Programming Objects, Classes and Inheritance (VRH 7.1-4) Polymorphism (VRH 6.4.3) Carlos.
Principles of Object-Oriented Software Development Interface Definition Language.
Chair of Software Engineering ATOT - Lecture 9, 30 April Advanced Topics in Object Technology Bertrand Meyer.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer.
Chair of Software Engineering OOSC - Lecture 21 1 Object-Oriented Software Construction Bertrand Meyer.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 9: Contracts and Inheritance (based on work with.
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 6: Genericity.
1 COMP 144 Programming Language Concepts Felix Hernandez-Campos Lecture 24: Dynamic Binding COMP 144 Programming Language Concepts Spring 2002 Felix Hernandez-Campos.
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 10.
Chair of Software Engineering OOSC - Summer Semester Bertrand Meyer Object-Oriented Software Construction Lecture 7: Inheritance.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 7.
Chair of Software Engineering ATOT - Lecture 7, 23 April Advanced Topics in Object Technology Bertrand Meyer.
1 Chapter 12 © 2002 by Addison Wesley Longman, Inc Introduction - Categories of languages that support OOP: 1. OOP support is added to an existing.
Inheritance and Polymorphism CS351 – Programming Paradigms.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 18 Object Database Management Systems.
Chair of Software Engineering ATOT - Lecture 22, 18 June Advanced Topics in Object Technology Bertrand Meyer.
Ranga Rodrigo. Class is central to object oriented programming.
Chair of Software Engineering Beyond Eiffel these slides contain advanced material and are optional.
Comparison of OO Programming Languages © Jason Voegele, 2003.
Engr 691 Special Topics in Engineering Science Software Architecture Spring Semester 2004 Lecture Notes.
Chapter 12: Adding Functionality to Your Classes.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Eiffel Naeem Esfahani University of Tehran "Man cannot discover new oceans unless he has the courage to lose sight of the shore." -- Andre Gide.
Programming Language C++ Xulong Peng CSC415 Programming Languages.
© S Ramakrishnan, Monash University oops1.ppt 1 Object-Oriented Programming Systems SFT3021 Semester Lecturer: Sita Ramakrishnan
More About Classes Ranga Rodrigo. Information hiding. Copying objects.
OOP Class Lawrence D’Antonio Lecture 3 An Overview of C++
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Chapter 12 Support for Object oriented Programming.
Type == Class  reference type -- store only the object’s address  simple (primitive) type -- for storing small data values Other options Wrapper classes.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Csci 490 / Engr 596 Special Topics / Special Projects Software Design and Scala Programming Spring Semester 2010 Lecture Notes.
Professor: Dr. Shu-Ching Chen TA: Hsin-Yu Ha Stored Procedure used in PosgreSQL.
1 Copyright © 1998 by Addison Wesley Longman, Inc. Chapter 11 Categories of languages that support OOP: 1. OOP support is added to an existing language.
Principles of Object-Oriented Software Development The language C++
Java Software Solutions Lewis and Loftus Chapter 9 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Enhanced Class Design -- Introduction.
Professor: Dr. Shu-Ching Chen TA: Hsin-Yu Ha Function, Trigger used in PosgreSQL.
1 Assertions. 2 A boolean expression or predicate that evaluates to true or false in every state In a program they express constraints on the state that.
Stephen Davis Ada Object-Oriented Programming. Overview Ada 83 is not considered a true “object-oriented” programming language. Although Ada 83 did support.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
1 Lecture 23: Dynamic Binding (Section ) CSCI 431 Programming Languages Fall 2002 A compilation of material developed by Felix Hernandez-Campos.
Polymorphism and Virtual Functions One name many shapes behaviour Unit - 07.
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
12.1 Introduction - Categories of languages that support OOP:
Object-Orientated Programming
Einführung in die Programmierung Introduction to Programming Prof. Dr
Object Oriented Analysis and Design
Interfaces.
Object-Oriented Programming
Einführung in die Programmierung Introduction to Programming Prof. Dr
Einführung in die Programmierung Introduction to Programming Prof. Dr
Einführung in die Programmierung Introduction to Programming Prof. Dr
Presentation transcript:

Principles of Object-Oriented Software Development The language Eiffel

Introduction Terminology Expressions Control Objects Inheritance Techniques Summary

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

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

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

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

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

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

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

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