Introduction to Object-Oriented Software Development

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

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
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Object Oriented System Development with VB .NET
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Lecture 13: Object- Oriented Concepts Anita S. Malik Adapted from Schach (2004) Chapter 7.
Object Oriented Software Development
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
IS0514Slide 1 IS0514 Lecture Week 5 Introduction to Object Orientation.
Creational Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
Association Class Generalization/Specialization Whole-Part Page More Associations 1.
Department of Informatics, UC Irvine SDCL Collaboration Laboratory Software Design and sdcl.ics.uci.edu 1 Informatics 43 Introduction to Software Engineering.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
1 Programming Paradigms Object Orientated Programming Paradigm (OOP)
Design Model Lecture p6 T120B pavasario sem.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
Business Applications with Object-Oriented Paradigm (Modeling Concepts) Professor Chen School of Business Gonzaga University Spokane, WA
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
© 2004 Pearson Addison-Wesley. All rights reserved January 23, 2006 Creating Objects & String Class ComS 207: Programming I (in Java) Iowa State University,
UML Class & Object Diagram I
Object-Oriented Programming
OOP - Object Oriented Programming
Unified Modeling Language (UML)
Sections Inheritance and Abstract Classes
Lec-4 : Unified Modeling Language (UML)
INTRODUCTION TO OBJECT-ORIENTED PROGRAMMING
Sachin Malhotra Saurabh Choudhary
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Systems Analysis and Design
Object-Oriented Programming Basics
Programming in Java Sachin Malhotra, Chairperson, PGDM-IT, IMS Ghaziabad Saurabh Chaudhary, Dean, Academics, IMS Ghaziabad.
The Object-Oriented Thought Process Chapter 1
Unified Modeling Language
The OO Solution The OO model closely resembles the problem domain
Analysis and Design with UML: Discovering Classes and Relationships
Object Oriented Programming
Creating Objects & String Class
INTRODUCTION TO OOP Objective:
Section 11.1 Class Variables and Methods
Analysis and Design with UML: Discovering Classes and Relationships
Object Orientation Yaodong Bi, Ph.D. Department of Computer Sciences
Analysis and Design with UML: Discovering Classes and Relationships
Engineering Quality Software
Object Oriented Analysis and Design Using the UML
Chapter 20 Object-Oriented Analysis and Design
Advanced Programming Behnam Hatami Fall 2017.
Appendix A Object-Oriented Analysis and Design
UML Class & Object Diagram I
ITEC 3220A Using and Designing Database Systems
Review CSE116 2/21/2019 B.Ramamurthy.
Analysis and Design with UML: Classes and Relationships
Workshop for Programming And Systems Management Teachers
Basic OOP Concepts and Terms
Object Oriented Analysis and Design
Programming For Big Data
Appendix A Object-Oriented Analysis and Design
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Appendix A Object-Oriented Analysis and Design
CS 4310: Software Engineering
Cheng (Sp2001): Object-Oriented Development Overview
From Class Diagram to Contract Diagram
Software Architecture & Design
Chapter 20 Object-Oriented Concepts and Principles
Presentation transcript:

Introduction to Object-Oriented Software Development 5/27/2019

Object-oriented modelling involves classes functioning as types describing their instances which are called objects. - You look around, and you see one particular chair, a table, a person, and you realize that the objects are related - the person is sitting on the chair by the table. - A system developed by using the object-oriented technique can be seen as a system consisting of a number of objects which cooperate to solve a task. 5/27/2019

Object-oriented modelling includes description of: - object properties - links between objects - object behaviour - You look around, and you see one particular chair, a table, a person, and you realize that the objects are related - the person is sitting on the chair by the table. - A system developed by using the object-oriented technique can be seen as a system consisting of a number of objects which cooperate to solve a task. 5/27/2019

Objects Icons representing “real world objects” of different types. myChair: :Bus :Plane :Truck :Ship PN62001:Car Represented in the UML notation. Anonymous object, only type is given Object name and no type Object name (id) and type At this moment you have x number of busses, one of them is represented by the buss picture. 5/27/2019

Classify Objects = Decide Their Classes Some objects share the same type of qualities so we may formulate a general concept – that is to define a class. This is a form of abstraction - some of the differences between the objects are “abstracted away” (ignored). Furniture myChair: yourChair: theBrownSofa: (a person has a name, the same number of chromosomes, ... ) A class describes a set of objects that have the same type of attributes, behaviour and relationships. 5/27/2019

Class and Objects in the UML Notation Person SSN name address drive() Run() ... class attributes operations (behaviour) Class name person1:Person SSN = 123... name= Jane address=Norway person2:Person SSN = 122... name = James address = USA objects You when you declare the class you select which attributes and operations (behavior) are of interest for your system. Objects of the given class will have individual values for the specified attributes. 5/27/2019

Plato versus Aristotle Plato talked about the ideas (classes) “behind the objects”, e.g., you have the idée horse – which in his view existed - and you have concrete horses. The programming language Self have only prototypes (objects). This is more in accordance with Aristotle: The classes have no existents by they own, the objects have an “immanent form” which makes it an object of a certain class. 5/27/2019

Does the ideas (/concepts/classes) “exist by themselves”? Creating an object by copying a prototype is that different from creating an object by instantiating a class? Copy prototype ~ copy operation is creating a copy of a section of memory. Instantiating a class ~ would involve execution of some code and may be also some copying… 5/27/2019

Making a Model You have a problem domain and you want to make a system that solves some problem in this domain. You single out what is essential for your problem, and you also typically simplify reality. You make a model of your system, ”objects from reality” are mapped ”directly onto objects in the model. chair: car: Tom: Seated in owner model mapping reality 5/27/2019

Subclass and Superclass The class of human beings The subclass of ”female objects” People is superclass of Female Jane: James: Person Female Male The classes represented in the UML notation. Person Female Male 5/27/2019

Class Hierarchy ~ Reuse by Inheritance An employee is a special type of person, so if you already have a Person class and needs an Employee class, then inheritance allows you to reuse class Person. Person SSN name address Employee title department An object of type Employee Jane:Employee SSN = 123... name = Jane address = Norway title = accountant department = accounting inheritance or specialization Employee is a specialisation of Person superclass subclass An object of type Employee is also a Person. An will have all attributes that a Person has plus all of its own. 5/27/2019

Multiple Inheritance UML supports multiple inheritance. Some object-oriented theoreticians claim that multiple inheritance should not be used! (e.g., Java). Cassette volume : Integer Book CassetteBook Some times when we describe a new class we see that this new class should have characteristics from two (or more) existing classes. It is then possible to inherit from both classes. 5/27/2019

One Common Ancestor for All Classes Object hashCode In Java all classes have a common ancestor called Object, e.g., in C++ this is not the case. Person Car E.g., common operations: clone(), getClass() Employee 5/27/2019

Linking Objects Objects are typically connected in some way or another. For example: Jane is married to James, Jane owns a car. ownership Person Car married association Class Model :ownership Object Model (model instance of class model) Jane:Person someWreck:Car Draw associations… :married link James:Person 5/27/2019

Part-of Relation Some objects can be seen as compost of other objects. Head 1 1 Arm 1 Person 2 1 2 Leg 5/27/2019

There Are Typically Many Ways to Classify Objects Jim might be classified as a person, a male person, an employee, a student and so on, the context decides. the classes may overlap (or they may be disjoint) xxx: Big box could be Person small once could be Male and Employee… 5/27/2019

Different Models May be Possible! Person Gender Person gender : String Gender Person Female Male Female Male Gender Person ? Androgyni Female Male Undecided Big box could be Person small once could be Male and Employee… Gender Person Female Male Androgyni 5/27/2019

Objects Have Behaviour operations ~ behaviour time sending a message Synchronous and also asynchronous “message passing”… 5/27/2019

An Object-Oriented Program Objects work together and solve problems. Objects have state, the values of the attributes defines the state. The state change when the values of the attributes change. Objects have identity. Some objects are linked together. The objects communicate by sending messages to each other (messages follows the links). Sending a message is the same as asking an object to perform one of its operations. 5/27/2019