IS0514Slide 1 IS0514 Lecture Week 5 Introduction to Object Orientation.

Slides:



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

Systems Analysis and Design with UML Version 2.0, Second Edition
IS514 Lecture Week 9 CRC Cards.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
PowerPoint Presentation for Dennis, Wixom & Tegardem Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
IS0514Slide 1 IS0514 Lecture Week 4 Use Case Modelling (2)
IS514Slide 1 IS514 Lecture Week 7 Class Diagrams II.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved. Slide 1 The.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
Lecture 32 Inheritance COMP1681 / SE15 Introduction to Programming.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
03/12/2001 © Bennett, McRobb and Farmer What Is Object-Orientation? Based on Chapter 4 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Lecture 1 Introduction to Computers and Object-
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 1 Introduction to Object-Oriented Programming.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
Object Oriented Concepts. Movement toward Objects Instead of data-oriented or process-oriented Analysis, many firms are now moving to object-oriented.
IS0514 Lecture Week 3 Use Case Modelling.
IS0514Slide 1 IS0517 Lecture Week 8 Class Diagrams III.
IS0514 Lecture - Week 2 Best Practice Development Methodology.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
BCS 2143 Introduction to Object Oriented and Software Development.
Chapter 1: Introduction to Systems Analysis and Design
Slide 1 UML Review Chapter 2: Introduction to Object-Oriented Systems Analysis and Design with the Unified Modeling Language, Version 2.0 Alan Dennis,
Unified Modeling Language, Version 2.0
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
IS0514Slide 1 IS0514 Lecture - Week 1 (Semester 2) Business Systems Development Tools and Techniques.
Systems Analysis & Design 7 th Edition Chapter 5.
Systems Analysis and Design 8 th Edition Chapter 6 Object Modeling.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design, 2 nd Edition Copyright 2003 © John Wiley & Sons, Inc. All rights reserved.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
BCS 2143 Object Oriented Design Using UML. Objectives Objects Interactions Finding Classes Relationship Between Classes Attribute and Operation Class.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Next Back MAP MAP F-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.
Slide 1 Objectives Understand the basic characteristics of object-oriented systems. Be familiar with the Unified Modeling Language (UML),V.2.0.
Basic Characteristics of Object-Oriented Systems
Chapter 11 An introduction to object-oriented design.
Chapter 4_part2: The Enhanced Entity-Relationship (EER) Model.
1 Design Object Oriented Solutions Object Oriented Analysis & Design Lecturer: Mr. Mohammed Elhajj
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
UML Class & Object Diagram I
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Systems Analysis and Design
Systems Analysis and Design With UML 2
The Object-Oriented Thought Process Chapter 1
Systems Analysis and Design With UML 2
Systems Analysis and Design With UML 2
OBJECT ORIENTED PROGRAMMING overview
IS0514 Lecture Week 3 Use Case Modelling.
UML Class & Object Diagram I
Introduction to Object-Oriented Software Development
Presentation transcript:

IS0514Slide 1 IS0514 Lecture Week 5 Introduction to Object Orientation

IS0514Slide 2 Why Object Oriented? Based on domain analysis / subject matter analysis Close match to real world Nearly all Modern Technologies are Object Oriented –Java / C# / C++ / PHP (object extension) / Delphi –Oracle – Object relational database –=> closer match to end solution Widely accepted ( most common approach ) Extensible / Maintainable Reusable

IS0514Slide 3 Today's Lecture Introduction to object orientation concepts –Object –Class –Method –Attribute –Relationships Inheritance

IS0514Slide 4 What is the world? The world can be seen to consist: –Things –Relationships between things A thing can be: –Physical / Tangible –Idea / Concept / Non-Tangible In object orientation a thing is called an Object “Thing-Oriented Analysis!”

IS0514Slide 5 Exercise 1 Think about the objects in this room. Try to identify the objects in this room –What “things” are here Physical Conceptual / Ideas In groups of 3-4 spend 5 minutes discussing what objects there are. At the end of that time you will be asked to share your thoughts with the rest of the class.

IS0514Slide 6 Exercise 1 - Possible Objects Physical The lecturer Each of the students Each of the seats The handouts Computer Projector Crisps / Chocolate / Cans Each of the Mobile phone – switched off or silent! Ideas The lecture itself Exercise 1 Lecture slide

IS0514Slide 7 Attributes and behaviour Objects have properties called attributes –Attributes are the data associated with an object Objects have behaviour – we call these methods –These are the tasks an object will do (typically when we ask it to) –These may also be called operations / member functions but we will try and call them methods Example – A Car –Attributes Make Model Engine Size Current Speed –Methods break() accelerate() changeGear() honkHorn()

IS0514Slide 8 Exercise 2 Think about the object “a student” Try an identify its –Attributes –Methods Think about which of these are relevant as regard to the university? In groups of 3-4 spend 5 minutes discussing this. At the end of that time you will be asked to share your thoughts with the rest of the class.

IS0514Slide 9 Exercise 2 - Solution Attributes Name Registration Number Date of Birth Gender Address Programme etc Methods AttendLecture() AttendSeminar() CompleteAssignment() SitExam() etc

IS0514Slide 10 Categories of things Things naturally fall into categories (Car, Furniture, House) In object orientation, a category of things is called a class – an object is an instance of a class – my car => object Car => class Objects share behaviour as defined by their class – respond to the same set of methods –For example all cars can accelerate –Some value(s) can affect what a method does Objects share Class attributes e.g. every car has a colour Object attributes will have different values

IS0514Slide 11 Exercise 3 Think about the objects in the room and try to identify what classes these objects belong to. In groups of 3-4 spend 5 minutes discussing this. At the end of that time you will be asked to share your thoughts with the rest of the class.

IS0514Slide 12 Exercise 3 - Possible Classes Physical Person Lecturer Student Seat Furniture Handout Computer Projector Ideas Lecture Exercise

IS0514Slide 13 Classes and Objects –more formally Class – Template to define specific instances or objects Object – Instantiation of a class Attributes – Describes each object Behaviors – Specify what each object can do –Methods (a.k.a. operations)

IS0514Slide 14 Classes and Objects

IS0514Slide 15 Methods and Messages Methods implement objects’ behavior –Analogous to a function or procedure Messages are sent to trigger methods –Procedure call from one object to another object

IS0514Slide 16 Messages and Methods

IS0514Slide 17 Relationships between Classes Classes / Objects can be related –Student completes Assignment –Student is registered for a Module –Student has access to the Blackboard Some relationships are stronger than others –Student is a kind of Person –Lecturer is a kind of Person Inheritance –Is a generalisation / specialisation relationship between two classes –Is “a kind of” relationship

IS0514Slide 18 Class Hierarchy

IS0514Slide 19 Exercise 4 Think about the class hierarchy between Person, Student, Lecturer, Full Time Student and Part Time Student. Draw the class hierarchy In groups of 3-4 spend 5 minutes discussing this. At the end of that time you will be asked to share your thoughts with the rest of the class.

IS0514Slide 20 Exercise 4 - Class Hierarchy Person LecturerStudent PartTimeStudentFullTimeStudent

IS0514Slide 21 Inheritance – some terms Superclasses or general classes are at the top of a hierarchy of classes Subclasses or specific classes are at the bottom Subclasses inherit attributes and methods from classes higher in the hierarchy In our tree, which are the subclasses and superclasses?

IS0514Slide 22 Inheritance

IS0514Slide 23 Basic Characteristics of Object Oriented Systems Classes and Objects Methods / Messages Inheritance THE BASICS OF OBJECT ORIENTATION Next Week: Class Diagrams

IS0514Slide 24 This weeks reading ESSENTIAL READING Dennis A, Wixom B, and Tegarden D (2005) System Analysis and Design with UML version 2 second edition, Wiley Pages Further reading Bennett, S., McRobb, S. and Farmer, R. (2002) Object- Oriented Systems Analysis and Design using UML, 2nd Edition, McGraw-Hill Chapter 4