Chapter 1: OO Thinking Not just learn Java, but also understand why it is the way it is Learn the OO worldview.

Slides:



Advertisements
Similar presentations
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.
Advertisements

OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Georgia Institute of Technology Workshop for CS-AP Teachers Chapter 3 Advanced Object-Oriented Concepts.
Object-Oriented Analysis and Design
Chapter 1 Object-Oriented System Development
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
Object Oriented System Development with VB .NET
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
Object-Oriented Thinking Chapter 1, Object-Oriented Programming in Java, Timothy Budd, 1998 ICS102 Semester
Lecture 2 Object Concepts I Object Oriented Analysis and Design K268 SENG2100 Pat Browne
© Wolfgang Pelz Introduction Object-Oriented Methods: Analysis, Design & Programming Dr. Wolfgang Pelz Dr. Yingcai Xiao The University of Akron.
Vrije Universiteit amsterdamPostacademische Cursus Informatie Technologie Themes and Variations abstraction -- the object metaphor modeling -- understanding.
Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Introduction to Object-oriented Programming Introduction to Object-oriented Programming CMPS 2143.
1 INTRODUCTION TO OOP Objective: Know the difference between functional programming and OOP Know basic terminology in OOP Know the importance of OOP Know.
Introduction To System Analysis and design
Comparison of OO Programming Languages © Jason Voegele, 2003.
CSCI-383 Object-Oriented Programming & Design Lecture 2.
An Object-Oriented Approach to Programming Logic and Design
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Object Oriented Programming with JAVA Arash N. Kia AlZahra University Definitions – Part 1.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
Features of Object Oriented Programming Lec.4. ABSTRACTION AND ENCAPSULATION Computer programs can be very complex, perhaps the most complicated artifact.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Objected Oriented Programming & Design JAVA Shishir Gupta (704) (704)
Object Orientation Yaodong Bi, Ph.D. Department of Computer Sciences University of Scranton October 18, 2015October 18, 2015October 18, 2015.
Object-Oriented (Real World Case) Object-Oriented Analysis CIM2566 Bavy LI.
DISTRIBUTED COMPUTING PARADIGMS. Paradigm? A MODEL 2for notes
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:
Ceg860 (Prasad)L1SQ1 Software Quality Object-Oriented Programming Paradigm.
OBJECT-ORIENTED PROGRAMMING (OOP) WITH C++ Instructor: Dr. Hany H. Ammar Dept. of Electrical and Computer Engineering, WVU.
Chapter 12 Support for Object oriented Programming.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
1 CMIS301 O-O Thinking Understanding O-O Programming by T Budd.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
ISBN Object-Oriented Programming Chapter Chapter
CSCI 383 Object-Oriented Programming & Design Lecture 3 Martin van Bommel.
Lecture 2: Review of Object Orientation. © Lethbridge/La ganière 2005 Chapter 2: Review of Object Orientation What is Object Orientation? Procedural.
Reference – Object Oriented Software Development Using Java - Jia COP 3331 Object Oriented Analysis and Design Chapter 10 – Patterns Jean Muhammad.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Basic Concepts of OOP.  Object-Oriented Programming (OOP) is a type of programming added to php5 that makes building complex, modular and reusable web.
Copyright 2005, The Ohio State University CSE – Introduction to C++ Name: Shirish Tatikonda Time: T 3:30 PM Room: BE 394
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
OOP - Object Oriented Programming
Object-Oriented Design
JAVA By Waqas.
Inheritance Allows extension and reuse of existing code
OOP What is problem? Solution? OOP
Object Oriented Programming in Java
INTRODUCTION TO OOP Objective:
Types of Programming Languages
Chapter 1: Object-Oriented Thinking
Inheritance Basics Programming with Inheritance
Computer Programming with JAVA
Workshop for Programming And Systems Management Teachers
Inheritance and Polymorphism
1.4 ทบทวน JAVA OO Programming Concepts Declaring and Creating Objects
Object-Oriented Programming
Presentation transcript:

Chapter 1: OO Thinking Not just learn Java, but also understand why it is the way it is Learn the OO worldview

A way of viewing the world Want to send flowers to another town How: ask your local florist request Message- passing responsibility Method: hidden “don’t even want to know the details (delegation)”

Agents and communities OO program = community of interacting agents called objects Each object provides a service, used by others: Gardener Grower Wholesaler Sally’s florist Flower arrangerDelivery person Sally Flora Me

Messages and methods Action: initiated by a message to an object responsible for the action Arguments: additional necessary information for the request Receiver: accepts message, performs some method to satisfy the request

More on methods Information hiding, be lazy, let someone else perform the task, reuse, use others’ services. Method <> Function Designated receiver Different interpretation depending on the specific receiver Receiver only known at runtime (late binding)

Responsibilities “ask not what you can do to your data structures, but what your data structures can do for you.” Act on a data structure vs. The data structures act on themselves Independence: more abstract Protocol: collection of responsibilities

Classes and instances All objects are instances of classes. Receiver’s class determines method for a given message. All objects/instances of a given class use the same method servicing similar messages.

Class hierarchies - Inheritance Flora Florist Shopkeeper Human Mammal Human Shopkeeper Artist Dentist Florist Potter Flora Elizabeth Kenneth

Classes Are organized as a hierarchical inheritance structure Child class inherits from parent classes higher in the tree Abstract parent classes (e.g. Mammal) don’t have direct instances

Search for method Starts at receiver, then goes up the tree Child may define method with same name and arguments: overriding Different methods for same message: polymorphism Java: can determine at compile-time that there will be some appropriate method, but may not know which

OO concept summary 1. Everything is an object. 2. Computation: sending & receiving messages (requests + arguments) 3. Each Object has its own memory (other objects) 4. Every object is instance of some class. 5. Class is a repository for behaviors. 6. Classes form a singly-rooted tree.

Computation is simulation “Instead of a bit-grinding processor … plundering data structures, we have a universe of well-behaved objects that courteously ask each other to carry out their various desires. [Ingalls 1981] Powerful metaphor