1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Chapter 22 Object-Oriented Design
2 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented Design
3 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 OOA and OOD
4 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 OOA and OOD classes classes attributes attributes methods methods relationships relationships behavior behavior Analysis Model Analysis Model objects objects data structures data structures algorithms algorithms messaging messaging control control Design Model Design Model (design classes)
5 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Design Issues decomposability—facility where a design method helps designer to decompose a large problem to solve; composability—degree to which a design method ensures that program components (modules), once designed and built, can be reused ; understandability—ease with which a program component can be understood without reference to other information or other modules; continuity—ability to make small changes in a program and have these changes manifest themselves with corresponding changes in just one or a very few modules; protection— architectural characteristic reducing the propagation of side affects if errors occur in a module.
6 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Generic Components for OOD Problem domain component—the subsystems that are responsible for implementing customer requirements directly; Human interaction component —the subsystems that implement the user interface (this included reusable GUI subsystems); Task Management Component—the subsystems that are responsible for controlling and coordinating concurrent tasks that may be packaged within a subsystem or among different subsystems; Data management component—the subsystem that is responsible for the storage and retrieval of objects.
7 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Process Flow for OOD
8 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 System Design Process Partition the analysis model into subsystems. Partition the analysis model into subsystems. Identify concurrency that is dictated by the problem. Identify concurrency that is dictated by the problem. Allocate subsystems to processors and tasks. Allocate subsystems to processors and tasks. Develop a design for the user interface. Develop a design for the user interface. Choose a basic strategy for implementing data management. Choose a basic strategy for implementing data management. Identify global resources and the control mechanisms required to access them. Identify global resources and the control mechanisms required to access them. Design an appropriate control mechanism for the system, including task management. Design an appropriate control mechanism for the system, including task management. Consider how boundary conditions should be handled. Consider how boundary conditions should be handled. Review and consider trade-offs. Review and consider trade-offs.
9 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 System Design
10 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Subsystem Example
11 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Subsystem Collaboration Table
12 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object Design A protocol description establishes the interface of an object by defining each message that the object can receive and the related operation that the object performs An implementation description shows implementation details for each operation implied by a message that is passed to an object. information about the object's private part internal details about the data structures that describe the object’s attributes procedural details that describe operations
13 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented Design You text gave a very detailed description of structured design and how you can take a data flow diagram and migrate it to a program structure chart.. Remember we censored that material. You text does not afford OO design that same detailed description. I will attempt to augment the text HERE.
14 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented Design WHAT WE HAVE – from the SRS 1. Use Case Diagrams 2. Process Diagrams for each major application process or applet (in our case just one) 3. Class Diagrams showing the major classes of the system. 4. State Transaction diagrams for each class.
15 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented Design WHAT WE NEED – for the SDS 1.General Architecture for the Design of the System including sub-systems, client server interfaces, and their related communications and allocations. 2. Design Class Diagrams showing the major classes of the system from a design perspective. 3. Use Case Diagrams denoting applets/applications with their supporting sequence diagrams.
16 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented High-Level Design High Level System Environmental Design Level of Client/Server What type machines at each level Database software needed at each level Communications software needed at each level Communications hardware needed at each level User Interface software proposed Any needed middleware
17 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented High-Level Design Client Server DB Server Client Server DB Server Environment Environment Environment Environment Environment Environment Compaq PC NT Visual Basic ….. Compaq Server NT Visual Basic MSMQ SNA Server (COMTI) Mainframe IBMXXX MVS CICS Cobol Programs Access SQL - 7 IMS Crystal Reports Hand Readers Cameras VB Screens
18 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented High-Level Design Client Server DB Server Client Server DB Server Environment Environment Environment Environment Environment Environment Compaq PC NT Visual Basic ….. Compaq Server NT Visual Basic MSMQ SNA Server (COMTI) Mainframe IBMXXX MVS CICS Cobol Programs Access SQL - 7 IMS Crystal Reports Hand Readers Cameras VB Screens TCPIP MSMQ Messages T1/transactions Twisted Pair SNA Server(COMTI) TCPIP CICS Trans T1 Line
19 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented Design Once the High Level System Environmental Design is complete You must: Define the classes needed at each level Define the use cases needed at each level. This requires an iterative process
20 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Object-Oriented High-Level Design Client Server DB Server Client Server DB Server Environment Environment Environment Environment Environment Environment
21 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System attributes methods ClassName Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Customer CID: int name: String authenticateCustomer () relationship rents 1..* Multiplicity
22 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Design Class Diagrams Domain classes (denoted in the analysis phase and reported on our SRS) Interface classes for all external interfaces Database/file classes for all persistent data Concurrency classes for controlling concurrency Analysis Patterns Application Patterns Design Pattern
23 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System – domain classes Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Customer CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Distributor distributorID: String Distributor Name: String ……. trackOrder()
24 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System – analysis patterns Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Customer CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Distributor distributorID: String Distributor Name: String ……. trackOrder() Party …….
25 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + interface classes Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Party CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Party View(s) CID: int name: String authenticateC ustomer () Movie View(s) CID: int name: String authenticateC ustomer () Rental View (s) CID: int name: String authenticateC ustomer ()
26 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + database classes Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Party CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Party View(s)Movie View(s)Rental View (s)Movie TableCassette TableRental TableParty TableDatabase Class
27 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Use Case Diagrams Video Rental System Enroll Customer Customer Return video Corporate Order new videos Use Case Actor System Rent video
28 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + use case classes Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Party CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Party View(s)Movie View(s)Rental View (s)Movie TableCassette TableRental TableParty TableDatabase ClassRent VideoEnroll CustomerReturn Video
29 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + use case views Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Party CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Party View(s)Movie View(s)Rental View (s)Movie TableCassette TableRental TableParty TableDatabase ClassRent VideoEnroll CustomerReturn Video Use case views Rent Video View
30 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + application patterns Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Party CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Party View(s)Movie View(s)Rental View (s)Movie TableCassette TableRental TableParty TableDatabase ClassRent VideoEnroll CustomerReturn VideoParty CtrlMovie CtrlRental CtrlRent Video ViewRent Video Ctrl
31 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + application patterns Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Party CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Party View(s)Movie View(s)Rental View (s)Movie TableCassette TableRental TableParty TableDatabase ClassRent VideoEnroll CustomerReturn VideoParty CtrlMovie CtrlRental CtrlRent Video ViewRent Video Ctrl
32 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + application patterns Cassette cassetteID: int cassetteVolumeNo: int rentMovie() Party CID: int name: String authenticateC ustomer () Rental cassetteID: int customerID: int dateRented: date rentMovie() Movie movieID: int movieName: String orderMovie() Party View(s)Movie View(s)Rental View (s)Movie TableCassette TableRental TableParty TableDatabase ClassRent VideoEnroll CustomerReturn VideoParty CtrlMovie CtrlRental Ctrl Rental Report Rent Video ViewRent Video Ctrl
33 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + design patterns Rent video read trans produce error msg validate trans determine type Set Proce Calculate Rental fee format output Set price calculate Rental fee format output rental invalid rental error msg Types: Children Current Classic ….. ……
34 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + design patterns Current MovieMovie movieID: int movieName: String orderMovie() Classic MovieChildren Movie Rent video
35 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + design patterns Current Movie Movie movieID: int movieName: String orderMovie() Classic Movie Children Movie Rent video Rent Video MovieFactoryIFMovieFactory Factory
36 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Class Diagrams Video Rental System + design patterns CurrentLineLineeClassicLineeChildrenLine Rent video Rent Video MovieFactoryIFMovieFactory Rental Report Report IFReport Builder Builder
37 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001 Use Case Diagrams Video Rental System Enroll Customer Customer Return video Corporate Order new videos Use Case Actor System Rent video