DOC PREVIEW
SJSU CMPE 133 - Object-oriented Design

This preview shows page 1-2-3-4-26-27-28-53-54-55-56 out of 56 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 56 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Object-oriented DesignObjectivesTopics coveredObject-oriented developmentCharacteristics of OODInteracting objectsAdvantages of OODObjects and object classesObjects and object classesThe Unified Modeling LanguageEmployee object class (UML)Object communicationMessage examplesGeneralisation and inheritanceA generalisation hierarchyAdvantages of inheritanceProblems with inheritanceUML associationsAn association modelConcurrent objectsServers and active objectsActive transponder objectAn active transponder objectJava threadsAn object-oriented design processProcess stagesWeather system descriptionSystem context and models of useLayered architectureSubsystems in the weather mapping systemUse-case modelsUse-cases for the weather stationUse-case descriptionArchitectural designWeather station architectureObject identificationApproaches to identificationWeather station descriptionWeather station object classesSlide 40Further objects and object refinementDesign modelsExamples of design modelsSubsystem modelsWeather station subsystemsSequence modelsData collection sequenceStatechartsWeather station state diagramObject interface specificationWeather station interfaceDesign evolutionChanges requiredPollution monitoringKey pointsSlide 56©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 1Object-oriented Design©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 2ObjectivesTo explain how a software design may be represented as a set of interacting objects that manage their own state and operationsTo describe the activities in the object-oriented design processTo introduce various models that can be used to describe an object-oriented designTo show how the UML may be used to represent these models©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 3Topics coveredObjects and object classes An object-oriented design processDesign evolution©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 4Object-oriented developmentObject-oriented analysis, design and programming are related but distinct.OOA is concerned with developing an object model of the application domain.OOD is concerned with developing an object-oriented system model to implement requirements.OOP is concerned with realising an OOD using an OO programming language such as Java or C++.©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 5Characteristics of OODObjects are abstractions of real-world or system entities and manage themselves.Objects are independent and encapsulate state and representation information. System functionality is expressed in terms of object services.Shared data areas are eliminated. Objects communicate by message passing.Objects may be distributed and may execute sequentially or in parallel.©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 6Interacting objectsstate o3o3:C3state o4o4: C4state o1o1: C1state o6o6: C1state o5o5:C5state o2o2: C3ops1()ops3 ()ops4 ()ops3 ()ops1 ()ops5 ()©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 7Advantages of OODEasier maintenance. Objects may be understood as stand-alone entities.Objects are potentially reusable components.For some systems, there may be an obvious mapping from real world entities to system objects.©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 8Objects and object classes Objects are entities in a software system which represent instances of real-world and system entities.Object classes are templates for objects. They may be used to create objects.Object classes may inherit attributes and services from other object classes.©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 9Objects and object classesAn object is an entity that has a state and a defined set of operations which operate on that state. The state is represented as a set of object attributes. The operations associated with the object provide services to other objects (clients) which request these services when some computation is required. Objects are created according to some object class definition. An object class definition serves as a template for objects. It includes declarations of all the attributes and services which should be associated with an object of that class.©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 10The Unified Modeling LanguageSeveral different notations for describing object-oriented designs were proposed in the 1980s and 1990s. The Unified Modeling Language is an integration of these notations.It describes notations for a number of different models that may be produced during OO analysis and design.It is now a de facto standard for OO modelling.©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 11Employee object class (UML)Employeename: stringaddress: stringdateOfBirth: DateemployeeNo: integersocialSecurityNo: stringdepartment: Deptmanager: Employeesalary: integerstatus: {current, left, retired}taxCode: integer. . .join ()leave ()retire ()changeDetails ()©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 12Object communicationConceptually, objects communicate by message passing.Messages•The name of the service requested by the calling object;•Copies of the information required to execute the service and the name of a holder for the result of the service.In practice, messages are often implemented by procedure calls•Name = procedure name;•Information = parameter list.©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 13Message examples// Call a method associated with a buffer // object that returns the next value // in the bufferv = circularBuffer.Get () ;// Call the method associated with a// thermostat object that sets the // temperature to be maintainedthermostat.setTemp (20) ;©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 14 Slide 14Generalisation and inheritanceObjects are members of classes that define attribute types and operations.Classes may be arranged in a class hierarchy where one class (a super-class) is a generalisation of one or more other classes


View Full Document

SJSU CMPE 133 - Object-oriented Design

Download Object-oriented Design
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Object-oriented Design and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Object-oriented Design 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?