Object-Oriented Thinking Chapter 1, Object-Oriented Programming in Java, Timothy Budd, 1998 ICS102 Semester - 071.

Slides:



Advertisements
Similar presentations
By Waqas Over the many years the people have studied software-development approaches to figure out which approaches are quickest, cheapest, most.
Advertisements

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.
Chapter 6 Problem Solving and Algorithm Design. 6-2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
OOP - Object Oriented Programming Object Oriented Programming is an approach to programming that was developed to make large programs easier to manage.
Systems Analysis and Design 8th Edition
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
An Introduction to Programming and Object Oriented Design using Java 2 nd Edition. May 2004 Jaime Niño Frederick Hosch Chapter 0 : Introduction to Object.
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
Introduction To System Analysis and Design
1 Chapter 6 Object-Oriented Software Design and Implementation.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
INTRODUCTION TO JAVA PROGRAMMING Chapter 1. What is Computer Programming?
Introduction to Object-oriented Programming Introduction to Object-oriented Programming CMPS 2143.
CSCI-383 Object-Oriented Programming & Design Lecture 15.
Chapter 9 High-Level Programming Languages: C++. Chapter Goals Describe the expectations of high level languages Distinguish between functional design.
Introduction To System Analysis and design
CSCI-383 Object-Oriented Programming & Design Lecture 2.
Introduction to Object-oriented programming and software development Lecture 1.
CSCI-383 Object-Oriented Programming & Design Lecture 4.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
BCS 2143 Introduction to Object Oriented and Software Development.
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.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Object-Oriented (Real World Case) Object-Oriented Analysis CIM2566 Bavy LI.
Object Oriented Programming Principles Lecturer: Kalamullah Ramli Electrical Engineering Dept. University of Indonesia Session-3.
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:
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Systems Analysis & Design 7 th Edition Chapter 5.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Chapter 12 Support for Object oriented Programming.
Object-Oriented Programming •Object-Oriented Programming (OOP) allows you to create your program based upon modeling objects.  Your program’s properties.
Object-Oriented Programming with Java Lecture 1: Introduction Autumn, 2007.
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.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Object-Oriented Programming © 2013 Goodrich, Tamassia, Goldwasser1Object-Oriented Programming.
CSCI 383 Object-Oriented Programming & Design Lecture 3 Martin van Bommel.
Objective You will be able to define the basic concepts of object-oriented programming with emphasis on objects and classes by taking notes, seeing examples,
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Object-Oriented Design Concepts University of Sunderland.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Chapter 2 Principles of Programming and Software Engineering.
A Survey of Object-Oriented Concept Oscar Nierstrasz.
CHAPTER 6 OBJECT ANALYSIS.
CSCI 383 Object-Oriented Programming & Design Lecture 15 Martin van Bommel.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Programming paradigms
JAVA By Waqas.
Chapter 10 Design Patterns.
TIM 58 Chapter 8: Class and Method Design
Object-Oriented Programming
Chapter 1: Object-Oriented Thinking
Chapter 0 : Introduction to Object Oriented Design
Presentation transcript:

Object-Oriented Thinking Chapter 1, Object-Oriented Programming in Java, Timothy Budd, 1998 ICS102 Semester - 071

A Way of Viewing The World Suppose I wish to send flowers to a friend who lives in a city many miles away. Let me call my friend Sally. Because of the distance, there is no possibility of my picking the flowers and carrying them to Sally's door myself. I merely go down to Flora, my local florist, tell her the variety and quantity of flowers I wish to send and Sally's address. I can be assured the flowers will be delivered.

Agents and Communities Let me emphasize that the mechanism I used to solve my problem was the following: find an appropriate agent (namely, Flora) and pass to her a message containing my request. It is the responsibility of Flora to satisfy my request. I do not need to know the method used by Flora to satisfy my request This information is usually hidden from me.

The method might be Flora delivers a slightly different message to another florist in Sally's city. That florist, in turn, perhaps has a subordinate who makes the floral arrangement. The florist then passes the flowers, along with yet another ,message, to a delivery person., and so on. Earlier, the florist in Sally's city had obtained his flowers from a flower wholesaler who, in turn, had interactions with the flower growers, each of whom had to manage a team of gardeners.

Observation Our first observation of object-oriented problem solving is that the solution to my problem required the help of many other individuals (Figure 1.1).

1st Principle of object-oriented problem solving 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.

2nd Principle of object-oriented problem solving Action is initiated in object-oriented programming by sending a message to an agent (an object) responsible for the action. The receiver is the object to whom the message is sent. The receiver will perform some method to satisfy the request.

Classes and Instances Although I have only dealt with Flora a few times, I have a rough idea of the behavior I can expect when I walk into her shop and present my request. I am able to make certain assumptions because I have information about florists in general, and I expect that Flora, being an instance of this category, will fit the general pattern.

3rd Principle of object-oriented problem solving 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 I have more information about Flora - not necessarily because she is a florist but because she is a shopkeeper. I know, for example, that I have to pay her money as part of the transaction. Any knowledge I have of Shopkeepers is also true of Florists and hence of Flora. One way to think about how I have organized my knowledge of Flora is in terms of a hierarchy of categories (see Figure 1.3)

Inheritance Classes can be 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 is a class (such as Mammal) for which there are no direct instances; it is used only to create subclasses.

Method Binding The search for a method to invoke in response to a given message begins with the class of the receiver. If no appropriate method is found, the search is conducted in the parent class of this class. The search continues up the parent class chain until either a method is found and executed, or a method is not found and an error message is issued.

Summary Object-oriented programming is not simply a few new features added to programming languages. Rather, it is a new way of thinking about the process of decomposing problems and developing programming solutions. Object-oriented programming views a program as a collection of loosely connected agents, termed objects. Each object is responsible for specific tasks. It is by the interaction of objects that computation proceeds..

Summary An object is an encapsulation of state (data values) and behavior (operations). The behavior of objects is dictated by the object class. Every object is an instance of some class. All instances of the same class will behave in a similar fashion (that is, invoke the same method) in response to a similar request.

Summary An object will exhibit its behavior by invoking a method in response to a message. Classes can be organized into a hierarchical inheritance tree. Data and behavior associated with classes higher in the tree can also be accessed and used by classes lower in the tree. Such classes are said to inherit their behavior from the parent classes.

Summary Designing an object-oriented program is like organizing a community of individuals. Each member of the community is given certain responsibilities. By reducing the interdependency among software components, object oriented programming permits the development of reusable software systems.

Summary Such components can be created and tested as independent units, in isolation from other portions of a software application. Reusable software components permit the programmer to deal with problems on a higher level of abstraction. We can define and manipulate objects simply in terms of the messages they understand and a description of the tasks they perform, ignoring implementation details.