OOP? What is OOP? Why? OOP in a nutshell. Stéphane Ducasse 2.1



Similar documents
How To Design Software

How To Develop Software

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

Génie Logiciel et Gestion de Projets. Evolution

4. Incorporate Lessons Learned with SDLC

Unit 2.1. Data Analysis 1 - V Data Analysis 1. Dr Gordon Russell, Napier University

Object-Oriented Systems Analysis and Design

Software Engineering. System Models. Based on Software Engineering, 7 th Edition by Ian Sommerville

Software Paradigms (Lesson 1) Introduction & Procedural Programming Paradigm

DATABASE MANAGEMENT SYSTEMS IN ENGINEERING

Object Oriented Design

ISSUES OF STRUCTURED VS. OBJECT-ORIENTED METHODOLOGY OF SYSTEMS ANALYSIS AND DESIGN

Data Analysis 1. SET08104 Database Systems. Napier University

CSC408H Lecture Notes

Module 1. Introduction to Software Engineering. Version 2 CSE IIT, Kharagpur

Algorithms, Flowcharts & Program Design. ComPro

Chapter 9 Software Evolution

Engineering Process Software Qualities Software Architectural Design

Patterns in. Lecture 2 GoF Design Patterns Creational. Sharif University of Technology. Department of Computer Engineering

Java (12 Weeks) Introduction to Java Programming Language

Entity-Relationship Model. Purpose of E/R Model. Entity Sets

Chapter 13 BUILDING INFORMATION SYSTEMS. How does building new systems produce organizational change?

Software Project Management Part 2: Work Breakdown Structures

Agile Software Development

22C:22 (CS:2820) Object-Oriented Software Development

Software Engineering. So(ware Evolu1on

Software development life cycle. Software Engineering - II ITNP92 - Object Oriented Software Design. Requirements. Requirements. Dr Andrea Bracciali

Compiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding

SE 360 Advances in Software Development Object Oriented Development in Java. Polymorphism. Dr. Senem Kumova Metin

Software Development and Object-Oriented Programming Paradigms

A Software Engineering Process for Operational Space Weather Systems. S. Dave Bouwer, W. Kent Tobiska Space Environment Technologies

Software Quality Factors OOA, OOD, and OOP Object-oriented techniques enhance key external and internal software quality factors, e.g., 1. External (v

CSC 742 Database Management Systems

Object-Oriented Design Guidelines

Curriculum Map. Discipline: Computer Science Course: C++

Unit I Page No. 1 System Development Object Basics Development Life Cycle Methodologies Patterns Frameworks Unified Approach UML

McGraw-Hill The McGraw-Hill Companies, Inc.,

Masters of Science in Software & Information Systems

A Comparative Analysis of Structured and Object-Oriented Programming Methods ASAGBA, PRINCE OGHENEKARO; OGHENEOVO, EDWARD E. CPN, MNCS.

Object-Oriented Middleware for Distributed Systems

Chapter 8 Approaches to System Development

Object-Oriented Databases

Object Oriented Programming. Risk Management

Glossary of Object Oriented Terms

Knowledge, Certification, Networking

Principles of Software Construction: Objects, Design, and Concurrency. Course Introduction. toad. toad Fall School of Computer Science

Software Engineering Introduction & Background. Complaints. General Problems. Department of Computer Science Kent State University

Functional Decomposition Top-Down Development

Formal Engineering for Industrial Software Development

AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.

BIS 3106: Business Process Management. Lecture Two: Modelling the Control-flow Perspective

Component Based Development in Software Engineering

History OOP languages Year Language 1967 Simula Smalltalk

Development/Maintenance/Reuse: Software Evolution in Product Lines

Aspect-Oriented Programming

What Do You Need from a Configuration Management Database (CMDB)? BEST PRACTICES WHITE PAPER

Object-Oriented Software Engineering

Architecture. Reda Bendraou

Introduction to Software Paradigms & Procedural Programming Paradigm

Software Development: An Introduction

Software Design Document (SDD) Template

Components Based Design and Development. Unit 2: Software Engineering Quick Overview

ASSISTING REFACTORING TOOL DEVELOPMENT THROUGH REFACTORING CHARACTERIZATION

The Class Blueprint A Visualization of the Internal Structure of Classes

Software Processes. Coherent sets of activities for specifying, designing, implementing and testing software systems

Program Understanding in Software Engineering

CMSC 435: Software Engineering Course overview. Topics covered today

IV. Software Lifecycles

Supplementary Material (New Language Leader Pre-Intermediate Unit 6) A Level Techers Copy

(Refer Slide Time 00:56)

Menouer Boubekeur, Gregory Provan

Figure 1. Basic Petri net Elements

Process Models and Metrics

Peter Mileff PhD SOFTWARE ENGINEERING. The Basics of Software Engineering. University of Miskolc Department of Information Technology

UNIVERSITY OF CALIFORNIA BERKELEY Engineering 7 Department of Civil and Environmental Engineering. Object Oriented Programming and Classes in MATLAB 1

Software Analysis Visualization

Acknowledgement. Software Engineering. CS 3141: Team Software Project Introduction

Bitter, Rick et al "Object-Oriented Programming in LabVIEW" LabVIEW Advanced Programming Techinques Boca Raton: CRC Press LLC,2001

DESIGN, IMPLEMENTATION, AND MANAGEMENT DO NOT COPY PETER ROB CARLOS CORONEL

Karunya University Dept. of Information Technology

ABET General Outcomes. Student Learning Outcomes for BS in Computing

Software Development Life Cycle (SDLC)

Introduction to Object-Oriented Programming

Component Based Development Methods - comparison

Software Design Principles and Guidelines

2. Conceptual Modeling using the Entity-Relationship Model

CS193j, Stanford Handout #10 OOP 3

Applying 4+1 View Architecture with UML 2. White Paper

A Capability Maturity Model (CMM)

Transcription:

OOP? What is OOP? Why? OOP in a nutshell Stéphane Ducasse 2.1

Reality on Software Development Analyze Maintain Design Construct Test What is important? maintainability extensibility understandability Stéphane Ducasse 2.2

Maintenance = Evolution 17.4% Corrective (fixing reported errors) data from [Lien78a] 18.2% Adaptive (new platforms or OS) 60.3% Perfective (new functionality) 4.1% Other The bulk of the maintenance cost is due to new functionality => even with better requirements, it is hard to predict new functions Stéphane Ducasse 2.3

The Waterfall Model is dead Stéphane Ducasse 2.4

Iterative Development Stéphane Ducasse 2.5

Lehman s Laws of Software Evolution Continous Change: A program that is used in a realworld environment must change, or become progressively less useful in that environment. Software Entropy: As a program evolves, it becomes more complex, and extra resources are needed to preserve and simplify its structure. Stéphane Ducasse 2.6

The Old Way Computer system consists of data and programs. Programs manipulate data. Programs organized by functional decomposition dataflow modules Stéphane Ducasse 2.7

New Paradigm Computer system consists of a set of objects. Objects are responsible for knowing and doing certain things. Objects collaborate to carry out their responsibilities. Programs organized by classes, inheritance hierarchies and subsystems Stéphane Ducasse 2.8

Accidental vs. Essential Complexity Assembly is perfect to write 8k programs! But we need abstraction tools to model the complexity of the world Object-oriented programming in only one way Reactive languages, Relational languages, Logic Languages, are others OOP helps reducing the accidental complexity not the essential Bad OO programs are also difficult to understand, extend, and maintain Stéphane Ducasse 2.9

What is an object, anyway? Mystical view Computing systems are made up of objects that communicate only by sending messages between each other. All computation is message sending. Stéphane Ducasse 2.10

What is an object, anyway? Scandinavian view A program is a simulation. Each entity in the system being simulated is represented by an entity in the program. Stéphane Ducasse 2.11

What is an object, anyway? Programming language view An object-oriented system is characterized by data abstraction inheritance polymorphism by late-binding of procedure calls Stéphane Ducasse 2.12

Modeling All phases of software life-cycle are modeling analysis - modeling of problem design - modeling of solution implementation - making model run on a computer maintenance - fixing/extending your model Stéphane Ducasse 2.13

Modeling Claim: people model the world with "objects" objects classes relationships between objects relationships between classes Stéphane Ducasse 2.14

Modeling Advantages of object-oriented software development more natural - matches the way people think single notation - makes it easy to move between software phases Stéphane Ducasse 2.15

Objects and Relationships John is Mary's father. Mary is John's daughter. Bob is Mary's dog. Mary is Bob's owner. Ann is John's employer. John is Ann's employee. Stéphane Ducasse 2.16

Objects and Attributes John's name is "John Patrick O'Brian". John's age is 27. John's address is 987 N. Oak St, Champaign IL 61820 What about John's employer? John's wife? What is an attribute, and what is a relationship? Stéphane Ducasse 2.17

Objects and Behavior John goes on a trip. John makes reservations. John buys tickets. John travels by airplane. John checks into hotel. Stéphane Ducasse 2.18

What is really an object? Anything we can talk about can be an object, including relationships ("the husband of the first party", "first-born son"). What are we trying to model? Models should be as simple as possible, but no simpler. Models are dictacted by domains Stéphane Ducasse 2.19

Object Messages Methods Data Stéphane Ducasse 2.20

Object: Behavior + State + Control What: Messages Specify what behavior objects are to perform Details of how are left up to the receiver State information only accessed via messages How: Methods Specify how operation is to be performed Must have access to (contain or be passed) data Need detailed knowledge of data Can manipulate data directly Messages Methods Data Stéphane Ducasse 2.21

Classification We naturally put objects into classes that have similar characteristics. John is a man. Mary is a woman. Bob is a dog. All women are people. All people are mammals. Stéphane Ducasse 2.22

Classes: Factory of Objects Reuse behavior => Factor into class Class: Factory object for creating new objects of the same kind Template for objects that share common characteristics Stéphane Ducasse 2.23

Class: Mold of Objects **Describe** state but not value of all the instances of the class Position, width and height for rectangles **Define** behavior of all instances of the class area ^ width * height Rectangle position width height area translatedby: apoint Stéphane Ducasse 2.24

Instances A particular occurrence of an object defined by a class Each instance has its own value for the instance variables All instances of a class share the same methods Rectangle position width height area translatedby: apoint 400@10 100 20 300@20 10 140 Stéphane Ducasse 2.25

How to Share Specification? Do not want to rewrite everything! Often times want small changes Class hierarchies for sharing of definitions Each class defines or refines the definition of its ancestors => inheritance Stéphane Ducasse 2.26

Inheritance New classes Can add state and behavior Can specialize ancestor behavior Can use ancestor s behavior and state Can hide ancestor s behavior To existing ones Direct ancestor = superclass Direct descendant = subclass Stéphane Ducasse 2.27

Comparable Quantity Hierarchy Stéphane Ducasse 2.28

Summary Objects have identity have attributes have behavior have relationships with other objects Stéphane Ducasse 2.29

Summary Classes **Describes** the attributes, and relationships of a set of objects Define the behavior of a set of objects Reuse, extend, specialize behavior from other classes Subclasses/superclasses form graph of generalizations Stéphane Ducasse 2.30