Object Oriented Programming

Similar documents
Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Subtyping (Dynamic Polymorphism)

Design by Contract in Eiffel

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

C++ (Non for C Programmer) (BT307) 40 Hours

MaanavaN.Com CS1203 OBJECT ORIENTED PROGRAMMING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Index. Index. More information. block statements 66 y 107 Boolean 107 break 55, 68 built-in types 107

Absolute C++ Walter Savitch

Topics. Modularity and Object-Oriented Programming. Dijkstra s Example (1969) Stepwise Refinement. Modular program development

Programming in Visual Basic with Microsoft Visual Studio 2010

PROGRAMMING IN VISUAL BASIC WITH MICROSOFT VISUAL STUDIO Course: 10550A; Duration: 5 Days; Instructor-led

Comp 311 Principles of Programming Languages Lecture 21 Semantics of OO Languages. Corky Cartwright Mathias Ricken October 20, 2010

The Java Programming Language

Course Description. Learn To: : Intro to JAVA SE7 and Programming using JAVA SE7. Course Outline ::

Programming I. Course 9 Introduction to programming

Lecture 18 Tao Wang 1

Lecture Notes on Programming Languages

0. Overview of this standard Design entities and configurations... 5

Chapter 10 Introduction to Classes

Object-Oriented Software Construction

The software lifecycle and its documents

QUIZ. How could we disable the automatic creation of copyconstructors

What are the characteristics of Object Oriented programming language?

A simple syntax-directed

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

Microsoft. Microsoft Visual C# Step by Step. John Sharp

Universe Type System for Eiffel. Annetta Schaad

Procedure and Object- Oriented Abstraction

Ch. 12: Operator Overloading

Week 7. Statically-typed OO languages: C++ Closer look at subtyping

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

BON Business Object Notation Based on slides by Prof. Paige

Object-Oriented Programming in C# (VS 2015)

Java SE7 Fundamentals

Chapter 5 Object-Oriented Programming

10266 Programming in C Sharp with Microsoft Visual Studio 2010

Object-Oriented Programming in C# (VS 2012)

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Object Oriented Programming with c++ Question Bank

Wrapping a complex C++ library for Eiffel. FINAL REPORT July 1 st, 2005

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1

Object-Oriented Design (OOD) and C++

Programming in Scala Second Edition

Syntax Analysis. Chapter 4

20483BC: Programming in C#

Problem Solving with C++

Introduce C# as Object Oriented programming language. Explain, tokens,

Java SE 7 Programming

Data Abstraction. Hwansoo Han

Programming in C# with Microsoft Visual Studio 2010

Microsoft Visual C# Step by Step. John Sharp

Java Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p.

Objects and Classes. Amirishetty Anjan Kumar. November 27, Computer Science and Engineering Indian Institue of Technology Bombay

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

QUIZ. How could we disable the automatic creation of copyconstructors

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

DOT NET Syllabus (6 Months)

Object Oriented Software Design II

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7)

Project 1: Scheme Pretty-Printer

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson


Rule 1-3: Use white space to break a function into paragraphs. Rule 1-5: Avoid very long statements. Use multiple shorter statements instead.

The Compositional C++ Language. Denition. Abstract. This document gives a concise denition of the syntax and semantics

C# Programming. Unit 1: Introducing C# and the.net FrameworkThis module explains the.net Framework, and using C# and

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 12: Classes and Data Abstraction

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

Object-Oriented Languages and Object-Oriented Design. Ghezzi&Jazayeri: OO Languages 1

Introduction to Programming Using Java (98-388)

B.C.A 2017 OBJECT ORIENTED PROGRAMMING USING C++ BCA303T MODULE SPECIFICATION SHEET

COP 3014: Fall Final Study Guide. December 5, You will have an opportunity to earn 15 extra credit points.

Computer Programming C++ (wg) CCOs

Advanced Topics in Object Technology

CS Exam 2 Study Suggestions

CSE 307: Principles of Programming Languages

Java Programming Course Overview. Duration: 35 hours. Price: $900

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1

Java SE 7 Programming

D Programming Language


Lecture 23: Object Lifetime and Garbage Collection

Java Overview An introduction to the Java Programming Language

CERTIFICATE IN WEB PROGRAMMING

Thanks! Review. Course Goals. General Themes in this Course. There are many programming languages. Teaching Assistants. John Mitchell.

Compaq Interview Questions And Answers

Chapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language

Programming in C# (20483)

Object-Oriented Modeling Using UML. CS151 Chris Pollett Aug. 29, 2005.

KLiC C++ Programming. (KLiC Certificate in C++ Programming)

CS304 Object Oriented Programming Final Term

UNIT II. Syllabus. a. An Overview of the UML: Visualizing, Specifying, Constructing, Documenting

UNIT II Requirements Analysis and Specification & Software Design

2 rd class Department of Programming. OOP with Java Programming

Functional Programming. Introduction To Cool

Java 8 Programming for OO Experienced Developers

2 ADT Programming User-defined abstract data types

Object Fundamentals Part Three. Kenneth M. Anderson University of Colorado, Boulder CSCI 4448/6448 Lecture 4 09/06/2007

Object Oriented Programming in Java. Jaanus Pöial, PhD Tallinn, Estonia

Object Oriented Programming

Transcription:

Object Oriented Programming Primary object-oriented language concepts dynamic lookup encapsulation inheritance subtyping Program organization Organize concepts into objects and relationships between them Build program to be extensible Both open and closed Comparison Objects as closures? L. Dillon, CSE 452, Fall 2008 1

Objects An object consists of hidden or private part instance variables / data members possibly, also some private functions public part public operations, or member functions, or methods, or messages possibly, also some public instance variables In Eiffel terminology: features Hidden part feature1... feature2... OO program Creates a root object which may create other objects which, in turn, may create other objects... Objects send messages to L. Dillon, CSE 452, Fall 2008 2 / invoke methods on / apply features of other objects

What s interesting about this? Universal encapsulation construct Flight simulator File system Database Window List Integer Metaphor usefully ambiguous sequential or concurrent computation distributed, synchronous or asynchronous communication L. Dillon, CSE 452, Fall 2008 3

Why study Eiffel? Completely object-oriented approach from start to finish Design by contract (DBC) method Language mechanisms supporting OO and DBC Classes, objects, assertions, contracts,... Single & multiple inheritance with redefinition undefinition renaming Genericity: contrained & unconstrained Uniform type system: safe covariance Agents (power of functional programming in OO) Once mechanisms Conversions Unrestricted streaming: files, databases, networks,... Full garbage collection L. Dillon, CSE 452, Fall 2008 4

Goals for Eiffel Productivity: faster time to market, fewer developers Reliability: fewer bugs Extensibility: be responsive to customer needs Reuse: stand on the shoulder of giants Efficiency: make the best use of hardware resources Maintainability: spend your time on new developments L. Dillon, CSE 452, Fall 2008 5

Some Eiffel principles Abstraction Information hiding Seamlessness Reversibility Design by contract Open-closed principle Single choice principle Uniform access principle Command-query separation principle Option-operand separation principle Strong style rules... L. Dillon, CSE 452, Fall 2008 6

Dogmatism Dogmatic where it counts Information hiding, e.g., not allowed: x.a := b Overloading Style rules One good way to do anything. Purposely left out Goto Functions as arguments Pointer arithmetic Cryptic symbols, e.g., x++, ++x Flexible when it makes no point to harass programmers Syntax, e.g., optional semicolon s L. Dillon, CSE 452, Fall 2008 7

Libraries Fundamental data structures and algorithms Portable graphics Internet, Web Lexical analysis, parsing Database interfaces... L. Dillon, CSE 452, Fall 2008 8

Eiffel lifecycle model Focus on abstractions Reuse (consumer and producer) Seamless development Reversibility Single model principle The software is the model The model is the software The software includes everything relevant to the project Tools automatically extract views analysis model, design, program, documentation,... Contracts as a guide to analysis, design, implementation, maintenance, management,... L. Dillon, CSE 452, Fall 2008 9

Object-Oriented Software Construction All you need is code Code is all you need --The bootles L. Dillon, CSE 452, Fall 2008 10

Seamless development Single notation, tools, concepts, principles Continuous, incremental development Model, implementation, documentation are always consistent Example classes at each stage: PLANE, ACCOUNT,... STATE, COMMAND,... HASH_TABLE,... TEST_DRIVER,... TABLE,... Reversibility L. Dillon, CSE 452, Fall 2008 11

The cluster method Clusters (set of related classes) Start with foundational clusters Mini lifecycles, each covering a cluster Always a d emo-able version at any point L. Dillon, CSE 452, Fall 2008 12

Mini-lifecycle tasks Specification Design / Implementation Verification & Validation (V&V) Generalization L. Dillon, CSE 452, Fall 2008 13

Language basics Language mechanisms supporting OO and DBC Classes, objects, assertions, contracts,... Single & multiple inheritance with redefinition undefinition renaming Genericity: contrained & unconstrained Uniform type system: safe covariance Agents (power of functional programming in OO) Once mechanisms Conversions Unrestricted streaming: files, databases, networks,... Full garbage collection L. Dillon, CSE 452, Fall 2008 14

Syntax conventions Semicolon used as a separator (not a terminator) It s optional almost all the time. Just forget about it! Style rules include Every feature should have a header comment Every class should have an indexing clause Recommended layout, indentation Recommended naming conventions for classes, features, etc.... L. Dillon, CSE 452, Fall 2008 15