Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.

Slides:



Advertisements
Similar presentations
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
IMS1805 Systems Analysis Topic 3: Doing Analysis (continued from previous weeks)
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Classes & Objects Computer Science I Last updated 9/30/10.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
Object-Oriented Analysis and Design
Object-Oriented PHP (1)
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
Stéphane Ducasse6.1 Essential Concepts Why OO? What is OO? What are the benefits? What are the KEY concepts? Basis for all the lectures.
Principles of Object-oriented Programming Programming Language Paradigms August 26, 2002.
Object-Oriented Databases
© Wolfgang Pelz Introduction Object-Oriented Methods: Analysis, Design & Programming Dr. Wolfgang Pelz Dr. Yingcai Xiao The University of Akron.
1 COMP 144 Programming Language Concepts Felix Hernandez-Campos Lecture 22: Object-Oriented Programming COMP 144 Programming Language Concepts Spring 2002.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
UFCEUS-20-2 : Web Programming Lecture 5 : Object Oriented PHP (1)
Programming Languages and Paradigms Object-Oriented Programming.
Introduction to Object-oriented programming and software development Lecture 1.
Objects and Components. The adaptive organization The competitive environment of businesses continuously changing, and the pace of that change is increasing.
An Object-Oriented Approach to Programming Logic and Design
CSCI-383 Object-Oriented Programming & Design Lecture 9.
Chapter 1: Introduction to Systems Analysis and Design
1 Chapter 10: Data Abstraction and Object Orientation Aaron Bloomfield CS 415 Fall 2005.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Unified Modeling Language, Version 2.0
Software Development. Software Developers Refresher A person or organization that designs software and writes the programs. Software development is the.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Kal Bugrara, Ph.DSoftware Engineering Northeastern University Fundamentals Of Software Engineering Lecture V.
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Real Time Programming Language. Intro A programming language represents the nexus of design and structure. But misuse of the programming language can.
Learners Support Publications Object Oriented Programming.
CS 3050 Object-Oriented Analysis and Design. Objectives What is “Object-Oriented?” Object-Oriented Approach Vs. Structured Approach How Has the Object-Oriented.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
(1) ICS 313: Programming Language Theory Chapter 12: Object Oriented Programming.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
OOP Review CS 124.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Business Applications with Object-Oriented Paradigm (Modeling Concepts) Professor Chen School of Business Gonzaga University Spokane, WA
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Chapter 2 Principles of Programming and Software Engineering.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
MANAGING COMPLEXITY Lecture OO01 Introduction to Object-oriented Analysis and Design Abstract Data Types.
Basic Characteristics of Object-Oriented Systems
ISBN Chapter 12 Support for Object-Oriented Programming.
Object Oriented Programming in Java Habib Rostami Lecture 2.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Principles of Programming & Software Engineering
Object Oriented Systems Design
Object-Oriented Programming
Design Patterns: MORE Examples
Object-Oriented Design
Chapter 1: Introduction to Systems Analysis and Design
The Movement To Objects
Object-Oriented Analysis and Design
Systems Analysis and Design With UML 2
Types of Programming Languages
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
Object orientation concepts
Chapter 1: Introduction to Systems Analysis and Design
Object-Oriented PHP (1)
Chapter 1: Introduction to Systems Analysis and Design
Presentation transcript:

Object-oriented design CS 345 September 20,2002

Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large numbers of interconnected modules –Complex behaviors Why is this? –Complex domain –Unclear user specifications –Moving Target –Team development –Characterizing discrete systems

Software Engineering In modern systems, software development is the bottleneck. As in other design problems, we try to apply well-tested and uniform techniques to software design. –This is software engineering. In particular, we’ll talk about object- oriented design –Distinct from object-oriented languages.

Object-oriented programming Uses objects (as opposed to algorithms) as the fundamental building block. –Think noun-oriented, not verb-oriented. Each object is an instance of a class –Objects all have a type Classes are related to one another via inheritance. –Class hierarchy makes relationships between objects explicit.

Object-oriented analysis and design Focus on modeling elements of the problem domain –As opposed to input-output relations or flowcharts. OO design: –Emphasis on proper design, rather than programming style. –Logical and physical decomposition of the system, both from a static and a dynamic perspective. OO languages should ease the mapping from design to program.

Types of OO Languages Pure –Smalltalk –Self Hybrid –Ada –C++ –Perl –Java –CLOS

Language tradeoffs Consistent semantics vs. incremental addition Efficiency vs. ease of use –E.g. garbage collection Complexity and functionality vs. simplicity –E.g. multiple inheritance. Integration with an environment Strong vs. weak typing Scope

Abstraction An abstraction denotes the essential properties of an object and hides the rest. What is essential depends upon the level at which you are viewing the object. Abstraction is essential in managing large software systems. An essential feature of OO design is the ability to abstract components.

Encapsulation Encapsulation involves separating out the methods used to invoke a behavior from the way that behavior is carried out. –Interface: the public face of an object –Implementation: How methods are carried out.

Why is encapsulation useful? Eases abstraction Prevents users from misusing internal structure. Helps avoid side-effects. Implementation can be changed without affecting external programs.

Inheritance One of the most popular OO features is inheritance. –Can define new classes in terms of existing classes. –This creates a class hierarchy in which subclasses take on the behavior of their parent classes. A subclass can generate new behaviors by –Defining new methods –Overriding a parent method.

Why is inheritance useful? Promotes code reuse. Aids in OO design –Encourages the development of hierarchies Allows for dynamic run-time behavior

Polymorphism Polymorphism is the idea that the same method can perform different operations on different data types. –Addition is polymorphic in most languages. Allows a programmer to write code without knowing the types of the data involved. [listOfStuff sort] <- don’t need to know what this is a list of.

Why is polymorphism useful? Provides a consistent set of operators –Aids in abstraction Allows for late binding of methods to targets. –We can specify that a particular object will perform a method without knowing its exact type until runtime.

Object-oriented design Design is separate from programming –You can write non-OO programs in Smalltalk. Designing software is both an art and a practice. –Iterative –A combination of intuition and sound methods

Static representations Class diagram –How are classes related to each other? Kind-of, has-a, creates Object diagram –How are instantiated objects related? How does one object use another? Module diagram –Shows how classes are organized within files. Process diagram –Shows the allocation of components to physical parts of a system. Specialized hardware, sensors, parallel machines.

Dynamic representations State transition diagrams –Look like finite state machines –Shows how an object or system can change Timing Diagrams –Shows the execution of methods over time against a timeline.