1 WXGC6102: Object-Oriented Techniques What Is Object-Orientation? References: Chapter 4 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.

Slides:



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

Chapter 7 System Models.
Database Systems: Design, Implementation, and Management Tenth Edition
Ch 3 System Development Environment
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
Object Oriented System Development with VB .NET
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Creating Architectural Descriptions. Outline Standardizing architectural descriptions: The IEEE has published, “Recommended Practice for Architectural.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
© Copyright Eliyahu Brutman Programming Techniques Course.
03/12/2001 © Bennett, McRobb and Farmer What Is Object-Orientation? Based on Chapter 4 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
Objectives Explain the purpose and objectives of object- oriented design Develop design class diagrams Develop interaction diagrams based on the principles.
Object-Oriented Analysis: some basic principles. Objects “Objects have state, behaviour and identity.” Booch (1994) State: the condition of an object.
Curtis H.K. Tsang, Clarence S.W. Lau and Y.K. Leung
Chapter 6 View Alignment Techniques and Method Customization (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis.
The chapter will address the following questions:
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Software Engineering 8. System Models.
Introduction To System Analysis and design
Copyright by Dr. Clarence Lau, IVE(TY)
Basic Concepts Introduction to OO Development and Software Engineering Principles SYSC System Analysis and Design.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
Introduction to UML By: Prof. Aiman Hanna Department of Computer Science, Concordia University, Montreal, Canada.
What Is Object-Orientation?
1 WXGC6102: Object-Oriented Techniques Modelling Concepts References: Chapter 5 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
Presented by: CHAN LAI SAN ( ) REBAH DAW SARREB ( ) FIDA AL-OBAISI ( ) 08 April 2008 (Tuesday 6pm – 7:30pm)
Introduction To System Analysis and Design
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Chapter 7 System models.
System models l Abstract descriptions of systems whose requirements are being analysed.
Pertemuan 19 PEMODELAN SISTEM Matakuliah: D0174/ Pemodelan Sistem dan Simulasi Tahun: Tahun 2009.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Systems Analysis and Design in a Changing World, 3rd Edition
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Systems Analysis & Design 7 th Edition Chapter 5.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Software Engineering Prof. Ing. Ivo Vondrak, CSc. Dept. of Computer Science Technical University of Ostrava
Unified Modeling Language* Keng Siau University of Nebraska-Lincoln *Adapted from “Software Architecture and the UML” by Grady Booch.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
© Bennett, McRobb and Farmer Avoiding the Problems Based on Chapter 3 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
CASE (Computer-Aided Software Engineering) Tools Software that is used to support software process activities. Provides software process support by:- –
 To explain why the context of a system should be modelled as part of the RE process  To describe behavioural modelling, data modelling and object modelling.
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
1 M206 Chapter 31: An Overview of Software Development 1.Defining the problem 2.Analyzing the requirement – constructing initial structural model 3.Analyzing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Abstract descriptions of systems whose requirements are being analysed
What Is Object-Orientation?
Presentation transcript:

1 WXGC6102: Object-Oriented Techniques What Is Object-Orientation? References: Chapter 4 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and Design Using UML, (3 rd Edition), McGraw Hill, Object-Oriented Technology - From Diagram to Code with Visual Paradigm for UML, Curtis H.K. Tsang, Clarence S.W. Lau and Y.K. Leung, McGraw-Hill Education (Asia), 2005

2 In This Lecture You Will Learn: The fundamental concepts of object- orientation The justifications for an object-oriented approach

3 Structured Approach Broadly speaking, there are two general approaches to software development: the structured approach and the object-oriented approach. The structured approach has been very fashionable since the 1970s; it was adequately supported by conventional procedural languages. The structured approach is centered on the system ’ s functional views and uses different models at various stages of the development process. When development progresses from one stage to the next, the models in the current stage are transformed into the models of the next stage.

4 Structured Approach (cont’d) There are three major weaknesses with the structured approach: – when functions of the system change => the analysis, the design models and the implementation of the system will have to be changed substantially. – transformation needs to be carried out whenever the models of the early stages have changed as a result of changes in the requirements or the correction of previous mistakes. – the dynamic view is almost non-existent in the structured approach. The above weaknesses of the structured approach have made it less cost-effective when compared with the object-oriented approach.

5 Object-oriented Approach This approach models a software system as a collection of collaborating objects. An object and its data interact with other objects through messages being sent and received by the object and which manipulate the object ’ s data in the process. The object-oriented approach allows the software engineer to develop consistent models of a software system much more easily, because the same set of models are used throughout the whole development process.

6 Object-oriented Approach (cont’d) No effort or time is wasted by transforming and updating models in different stages. Changes to an object-oriented system are localized in the objects themselves. Therefore, the structure of a system developed by the object-oriented approach is more stable than that by the structured approach.

7 Basic Concepts of OO The main concepts introduced here are: – Objects, Classes and Instances – Object State – Generalization and Specialization – Message-passing and Encapsulation – Polymorphism

8 Objects An object is: “an abstraction of something in a problem domain, reflecting the capabilities of the system to – keep information about it, – interact with it, – or both.” Coad and Yourdon (1990)

9 Objects “Objects have state, behaviour and identity.” Booch (1994) State: the condition of an object at any moment, affecting how it can behave Behaviour: what an object can do, how it can respond to events and stimuli Identity: each object is unique

10 Examples of Objects Object A person. ‘Hussain Pervez.’ Speak, walk, read. Studying, resting, qualified. A shirt. My favourite button white denim shirt. Shrink, stain, rip. Pressed, dirty, worn. A sale. Sale no #0015, 18/05/05. Earn loyalty points.Invoiced, cancelled. IdentityBehaviourState A bottle of ketchup. This bottle of ketchup. Spill in transit.Unsold, opened, empty.

11 Class and Instance All objects are instances of some class Class: a description of a set of objects with similar – features (attributes, operations, links); – semantics; – constraints (e.g. when and whether an object can be instantiated). OMG (2004)

12 Class and Instance An object is an instance of some class So, instance = object – but also carries connotations of the class to which the object belongs Instances of a class are similar in their: – Structure: what it knows, what information it holds, what links it has to other objects – Behaviour: what an object can do

13 Generalization and Specialization Classification is hierarchic in nature For example, a person may be an employee, a customer, a supplier of a service An employee may be paid monthly, weekly or hourly An hourly paid employee may be a driver, a cleaner, a sales assistant

14 Specialization Hierarchy Person EmployeeCustomer Supplier monthly paid weekly paid hourly paid DriverCleaner Sales assistant More general (superclasses) More specialized (subclasses)

15 Generalization and Specialization More general bits of description are abstracted out from specialized classes: Person name date of birth gender title HourlyPaidDriver startDate standardRate overtimeRate licenceType General (superclass)Specialized (subclass)

16 Inheritance The whole description of a superclass applies to all its subclasses, including: – Information structure (including associations) – Behaviour Often known loosely as inheritance (But actually inheritance is how an O-O programming language implements generalization / specialization)

17 Message-passing Several objects may collaborate to fulfil each system action “Record CD sale” could involve: – A CD stock item object – A sales transaction object – A sales assistant object These objects communicate by sending each other messages

18 Message-passing and Encapsulation Message from another object requests a service. Operation called only via valid operation signature. Data accessed only by object’s own operations. An object’s data is hidden (encapsulated). ‘Layers of an onion’ model of an object: An outer layer of operation signatures… …gives access to middle layer of operations… …which can access inner core of data

19 Polymorphism Polymorphism allows one message to be sent to objects of different classes Sending object need not know what kind of object will receive the message Each receiving object knows how to respond appropriately For example, a ‘resize’ operation in a graphics package

20 Polymorphism in Resize Operations Campaign title campaignStartDate campaignFinishDate getCampaignAdverts() addNewAdvert() > Campaign title campaignStartDate campaignFinishDate getCampaignAdverts() addNewAdvert() >

21 Advantages of O-O Can save effort – Reuse of generalized components cuts work, cost and time Can improve software quality – Encapsulation increases modularity – Sub-systems less coupled to each other – Better translations between analysis and design models and working code

22 Visual Modeling The human brain is capable of handling and processing only a limited amount of information at any one time. Models can help reduce complexity by creating an abstract hierarchical representation of the real-world system. Visual modeling is the process of representing a system with essential parts from a particular perspective using some standard graphical notations.

23 Visual Modeling (cont’d) In the software development process, visual modeling can: – capture business objects and logic; – analyze and design applications; – manage complexity; – define the software architecture; and – model systems independent of the implementation language. Unified Modeling Language (UML)

24 Software Development Methods

25 Role of Notation Capture requirements of the system; Analyze the system by developing suitable analysis models - Models are expressed in an appropriate notation so that the developer can easily find the things from which he or she can quickly extract information; Develop the design of the system - Design models are developed and expressed in an appropriate notation that can be understood by the system designer and the programmer. The system designer may need to manipulate the analysis model and make design decisions in the process; and Implement, test and deploy the system - Again, the artifacts of these activities are expressed in a suitable notation that can be understood by the system designer, the programmers and system testers.

26 Role of Process Ideally, a process should offer the following features: – a well-managed iterative and incremental life cycle to provide the necessary control without affecting creativity; – embedded methods, procedures and heuristics for developers to carry out analysis, design and implementation for the whole software development life cycle (SDLC); – a guide through the iterative and incremental development process for the solution of complex problems; – a comprehensive roadmap so that designers can walk through the flexible multiple pathways of the development process depending on the nature of the problem; and – identification of less obvious requirements based on what have already been known or modeled.

27 Role of Techniques The main purpose of the techniques part of a method is to provide a set of guidelines and heuristics to help the developer to systematically develop the required design models and implementation. The techniques part of a method should include the following: – a set of guidelines to produce and verify the design against the original requirements and specifications; – a set of heuristics for the designer to ensure consistency in the structure of a design and also the design models. The latter requirement is particularly important when the design is produced by a team of designers who will need to ensure that their models are consistent and coherent; – a system to capture the essential features of the design so as to supplement the limited designer ’ s domain knowledge.

28 Overview of the UML The UML is accepted by the Object Management Group (OMG) as a standard way of representing object-oriented analysis and design models. It has quickly become the de facto standard for building object- oriented software. The OMG specification states: – “ The Unified Modeling Language (UML) is a graphical language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive system. The UML offers a standard way to write a system's blueprints, including conceptual things such as business processes and system functions as well as concrete things such as programming language statements, database schemas, and reusable software components. ” Refer to Appendix B of the book (Curtis H.K. Tsang, Clarence S.W. Lau and Y.K. Leung (2005)) for a more detailed description of the UML.

29 Overview of Visual Paradigm for UML CASE tools can significantly help developers increase their productivity, particularly if they provide facilities that automate many model building procedures. Indeed, some CASE tools offer sophisticated facilities such as diagram-to-code and code-to-diagram, with real-time synchronization and consistency maintained in both directions. VP-UML, like most leading CASE tools, meets the following requirements: – Facilitate convenient model building. Models of the system should be easily developed. Editor and documentation tools should be provided and easy to use; – Serve as repository. Models can be saved and retrieved with ease; – Support navigation. Linkages between models can be maintained and traversed;

30 Overview of Visual Paradigm for UML – Generate documentation automatically. Documentations can be generated for selected information of the software development project; – Facilitate project management. The project activities can be planned and managed with ease; – Facilitate configuration management and version control. Documentations and components of different versions of the system can be managed; – Check model consistency. Consistency between models of the system can be checked; – Support model verification and validation. The correctness of the models of the system can be verified and validated; – Provide multi-user support. Multiple developers can work on the project simultaneously and coherently; – Generate code. Code can be generated from models;

31 Overview of Visual Paradigm for UML – Reverse engineering. Models can be generated from code; and – Provide integration with other tools. The CASE tool can be integrated with domain specific systems or tools so as to accelerate the development process. Appendix A of the book (Curtis H.K. Tsang, Clarence S.W. Lau and Y.K. Leung (2005)) provides more information about how you can get started using the VP-UML CASE tool.

32 References Curtis H.K. Tsang, Clarence S.W. Lau and Y.K. Leung (2005) Coad and Yourdon (1990) Booch (1994) OMG (2004) (For full bibliographic details, see Bennett, McRobb and Farmer)