Object Oriented Concepts & Principles Ingrid Kirschning & Gerardo Ayala.

Slides:



Advertisements
Similar presentations
Introduction to Object Orientation System Analysis and Design
Advertisements

General OO Concepts Objectives For Today: Discuss the benefits of OO Programming Inheritance and Aggregation Abstract Classes Encapsulation Introduce Visual.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
Classes & Objects Computer Science I Last updated 9/30/10.
Stéphane Ducasse2.1 OOP? What is OOP? Why? OOP in a nutshell.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Object-Oriented PHP (1)
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
Object-Oriented Databases v OO systems associated with – graphical user interface (GUI) – powerful modeling techniques – advanced data management capabilities.
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.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Object-oriented Programming Concepts
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
© Copyright 2012 by Pearson Education, Inc. All Rights Reserved. 1 Chapter 7 Object-Oriented Programming.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
C++ fundamentals.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
BACS 287 Basics of Object-Oriented Programming 1.
Object Oriented Programming
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Object Oriented Software Development
Programming Languages and Paradigms Object-Oriented Programming.
BCS 2143 Introduction to Object Oriented and Software Development.
CISC6795: Spring Object-Oriented Programming: Polymorphism.
CS212: Object Oriented Analysis and Design Lecture 1: Introduction.
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Kal Bugrara, Ph.DSoftware Engineering Northeastern University Fundamentals Of Software Engineering Lecture V.
Learners Support Publications Object Oriented Programming.
CSC 131 Fall 2006 Lecture # 6 Object-Oriented Concepts.
Programming Paradigms Lecturer Hamza Azeem. What is PP ? Revision of Programming concepts learned in CPLB Learning how to perform “Object-Oriented Programming”
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
1 CMIS301 O-O Thinking Understanding O-O Programming by T Budd.
OOP Review CS 124.
 Class diagrams show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and.
CMSC 345 Fall 2000 OO Design. Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent.
Lecture 2: Review of Object Orientation. © Lethbridge/La ganière 2005 Chapter 2: Review of Object Orientation What is Object Orientation? Procedural.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
OOP Basics Classes & Methods (c) IDMS/SQL News
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Basic Characteristics of Object-Oriented Systems
Chapter 11 An introduction to object-oriented design.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
Object-oriented programming (OOP) is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their.
CPRG 215 Introduction to Object-Oriented Programming with Java Module 3- Introduction to Object Oriented Programming concepts Topic 3.1 Fundamental Concepts.
Inheritance Modern object-oriented (OO) programming languages provide 3 capabilities: encapsulation inheritance polymorphism which can improve the design,
Object-Oriented Design
Chapter 7 Object-Oriented Programming
Sachin Malhotra Saurabh Choudhary
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Programming in Java Sachin Malhotra, Chairperson, PGDM-IT, IMS Ghaziabad Saurabh Chaudhary, Dean, Academics, IMS Ghaziabad.
Software Engineering Fall 2005
OOP What is problem? Solution? OOP
Object Oriented Concepts -I
INTRODUCTION TO OOP Objective:
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
3 Fundamentals of Object-Oriented Programming
What Is Good Software(Program)?
Object Oriented Analysis and Design
The OOTP is intended to get you thinking about how OO concepts are used in designing object-oriented systems. Note: not talking about OO technologies that.
Chapter 20 Object-Oriented Concepts and Principles
Presentation transcript:

Object Oriented Concepts & Principles Ingrid Kirschning & Gerardo Ayala

Object Oriented Paradigm (Paradigm: a way of seeing and doing things) Object - Oriented (OO) Programming: –Organizing software as a collection of objects with a certain state and behavior. Object Oriented Design: –Based on the identification & organization of objects. OO Methodology –Construction of models –The development of SW is a modeling process OO Modeling and Design –Modeling objects based on the real world –Using models to design independently of a programming language.

Objects Object: Complex data type that has an identity, contains other data types called attributes and modules of code called operations or methods Attributes and associated values are hidden inside the object. Any object that wants to obtain or change a value associated with other object, must do so by sending a message to one of the objects (invoking a method)

Objects Age: 35 methods (methods) Attributes (values) Set_salary (20) Object: woman method: Set_salary employer Get_age friend Salary: 10

Encapsulation Each objects methods manage it’s own attributes. This is also known as hiding. An object A can learn about the values of attributes of another object B, only by invoking the corresponding method (message) associated to the object B. Example: –Class: Lady –Attributes: Age, salary –Methods: get_age, set_salary

Procedural vs. Object-Oriented Procedural applicationOO-application DATA Line of code Data is stored independent of application Each object is independent of the others

Classes Classes are templates that have methods and attribute names and type information, but no actual values! Objects are generated by these classes and they actually contain values. We design an application at the class level. When the system is running objects are created by classes as they are needed to contain state information. When objects are no longer needed by the application, they are eliminated.

Class & Objects Name Number CLASS: Furniture methods: Example ChangeNumber Objects: Desk ChairA ChairB 45687

Message Passing & Associations Methods are associated with classes but classes don’t send messages to each other. Objects send messages. A static diagram (class diagram) shows classes and the logical associations between classes, it doesn´t show the movement of messages. An association between two classes means that the objects of the two classes can send messages to each other. Aggregation: when an object contains other objects ( a part-whole relationship)

Class Hierarchies & Inheritance Classes can be arranged in hierarchies so that more classes inherit attributes and methods from more abstract classes Class hierarchy diagrams Class: Chair subclasses Chair Type AChair Type B

Class Inheritance & Specialization Class: Furniture Attribute A1 Method A1 Class: Chairs [Attribute A1] Attribute B1 [Method A1] Method B1 Class: Executive Chairs [Attribute A1] [Attribute B1] Attribute C1 [Method A1] Method B1 (B1 code modified) Method C1 Class nameAttributes Methods Is a specialization of Or Inherits from

Public, Private & Protected Attributes can be public or private: –Private: it can only be accessed by its own methods –Public: it can be modified by methods associated with any class (violates encapsulation) Methods can be public, private or protected: –Public: it’s name is exposed to other objects. –Private: it can’t be accessed by other objects, only internally –Protected: (special case) only subclasses that descend directly from a class that contains it, know and can use this method.

Method signature It is the method’s name and the parameters that must be passed with the message in order for the method to function. The parameters are important because they assure that the method will function properly. Additionally they allow a compiler or interpreter to discriminate between two different methods with the same name.

Polimorphism Means that the same method will behave differently when it is applied to the objects of different classes It also means that different methods associated with different classes can interpret the same message in different ways. Example: an object can send a message PRINT to several objects, and each one will use it’s own PRINT method to execute the message.