Chapter 1: Object-Oriented Thinking

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Modeling Main issues: What do we want to build How do we write this down.
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Object-Oriented Thinking Chapter 1, Object-Oriented Programming in Java, Timothy Budd, 1998 ICS102 Semester
Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
C++ fundamentals.
The chapter will address the following questions:
Object Oriented Programming
Introduction To System Analysis and design
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Object-Oriented (Real World Case) Object-Oriented Analysis CIM2566 Bavy LI.
CSSE501 Object-Oriented Development. Chapter 11: Static and Dynamic Behavior  In this chapter we will examine the differences between static and dynamic.
CSCI-383 Object-Oriented Programming & Design Lecture 3.
1 OBJECT-ORIENTED THINKING Ziya Karakaya Atılım University Tel: (312) / 5345 Faks: (312) E-posta:
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Learners Support Publications Object Oriented Programming.
Chapter 1: OO Thinking Not just learn Java, but also understand why it is the way it is Learn the OO worldview.
1 CMIS301 O-O Thinking Understanding O-O Programming by T Budd.
CSCI 383 Object-Oriented Programming & Design Lecture 3 Martin van Bommel.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
SWE 4743 Responsibility Driven Design with CRC cards Richard Gesick.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
AUSF Agent based User Simulation Framework Om Narayan.
OOP - Object Oriented Programming
OPERATING SYSTEMS CS 3502 Fall 2017
Object-Oriented Design
Programming paradigms
Object Oriented Programming
Polymorphism, Interfaces & Operator Overloading
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Chapter 1: Introduction to Systems Analysis and Design
ATM OO Design and Implementation Case Study
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Main issues: • What do we want to build • How do we write this down
Sections Basic Concepts of Programming
Object-Oriented Analysis and Design
Java Software Solutions
Systems Analysis and Design With UML 2
Systems Analysis and Design With UML 2
Lecture 2 of Computer Science II
Anatomy of a Class & Method
Lecture 1 Introduction.
Software Architecture & Design Pattern
Computer Programming.
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Chapter 0 : Introduction to Object Oriented Design
Copyright 2007 Oxford Consulting, Ltd
Chapter 1: Introduction to Systems Analysis and Design
Object-Oriented Programming: Inheritance and Polymorphism
Workshop for Programming And Systems Management Teachers
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Chapter 4 System Modeling.
Chapter 1: Introduction to Systems Analysis and Design
Java Software Solutions
Chapter 20 Object-Oriented Concepts and Principles
Presentation transcript:

Chapter 1: Object-Oriented Thinking Presentation slides for Object-Oriented Programming by Yahya Garout KFUPM Information & Computer Science Department

Outline A way of Viewing the World Computation as Simulation Agents and Communities Messages and Methods Responsibilities Classes and Instances Class Hierarchies-Inheritance Method Binding, Overriding, and Exceptions Summary of Object-Oriented Concepts Computation as Simulation The Power of Metaphor

Agents and Communities An object-oriented program is structured as a community of interacting agents, called objects Each object has a role to play Each object provides a service, or performs an action, that is used by other members of the community

Messages and Methods Actions is initiated in object-oriented programming by the transmission of a message to an agent (an object) responsible for the action The message encodes the request for an action It is accompanied by any additional information (arguments) needed to carry out the request The receiver is the object to whom the message is sent If the receiver accepts the message, it accepts the responsibility to carry out the indicated action In response to a message, the receiver will perform some method to satisfy the request

Responsibilities A fundamental concept in object-oriented programming is to describe the behavior in terms of responsibilities This permits greater independence between objects, a critical factor in solving complex problems The entire collection of responsibilities associated with an object is often termed the protocol

Classes and Instances All objects are instances of a class The method invoked by an object in response to a message is determined by the class of the receiver All objects of a given class use the same method in response to similar messages

Class Hierarchies-Inheritance Classes are organized into a hierarchical inheritance structure A child class (or subclass) will inherit attributes from a parent class higher in the tree An abstract parent class for which there are no direct instances, it is used only to create subclasses

Binding, Overriding, and Exceptions Determining which method will be invoked at run-time In response to a message, the search for a method begins with the class of the receiver If no method is found, the search is conducted in the parent class The search continues up the parent class chain until either a method is found or the chain is exhausted If the method is found, it will be executed If not, an error message is issued Methods of the same name in the class hierarchy is overriding

Summary of Object-Oriented Concepts Everything is an object Computation is performed by objects communicating with each other by sending and receiving messages Each object has its own memory Every object is an instance of a class The class is the repository for behavior associated with an object Classes are organized into a singly rooted tree structure, called the inheritance hierarchy

Computation as Simulation The view of programming is different from the conventional conception of a computer. The traditional model describing the behavior of a computer executing a program is a process-state or pigeonhole model The computer is a data manager, following some pattern of instructions, wandering through memory, pulling values, transforming them in some manner, and pushing results back into other slots By examining the values in the slots, we can determine the results produced Accurate but does not help to understand how to solve problems using the computer

Computation as Simulation Not the way most people go about solving problems In object-oriented framework we speak of objects, messages, and responsibility for some action A universe of well-behaved objects that ask each other to carry out their various desires A process of creating a host of helpers that form a community and assist the programmer in the solution of a problem Similar to the style of computer simulation called “discrete event-driven simulation” In discrete event-driven simulation, the user creates computer models of the various elements, describes how they will interact with one another, and sets them moving

Computation as Simulation Almost identical to the average object-oriented program The user describes what the various entities in the universe for the program are, and how they will interact, and finally sets them in motion In object-oriented programming, we have the view that computation is simulation

The Power of Metaphor A benefit to the use of object-oriented techniques is the power of metaphor When programmers think about problems in terms of behaviors and responsibilities, they bring with them a wealth of intuition, ideas, and understanding from their everyday experience. Journalists make use of metaphor everyday, as in the following description from Newsweek: Unlike the usual programming method-writing software one line at a time-NeXT’s “object –oriented” system offers larger building blocks that developers can quickly assemble the way a kid builds faces on Mr. Potato Head

The Power of Metaphor It is useful to envision the process of programming as like the task of training a universe of agents to interact smoothly with each other, each providing a certain small and well-defined service to the other, each contributing to the effective execution of the whole Think about how you have organized communities of individuals, each member is given certain responsibilities, and the achievement of the goals depends upon each member fulfilling his role