html5-img
1 / 37

Chapter 22 Object-Oriented Design

Chapter 22 Object-Oriented Design. Object-Oriented Design. OOA and OOD. c. l. a. s. s. e. s. c. l. a. s. s. e. s. o. b. j. e. c. t. s. o. b. j. e. c. t. s. a. t. t. r. i. b. u. t. e. s. a. t. t. r. i. b. u. t. e. s. d. a. t. a. s. t. r. u.

jacqui
Télécharger la présentation

Chapter 22 Object-Oriented Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 22Object-Oriented Design

  2. Object-Oriented Design

  3. OOA and OOD

  4. c l a s s e s c l a s s e s o b j e c t s o b j e c t s a t t r i b u t e s a t t r i b u t e s d a t a s t r u c t u r e s d a t a s t r u c t u r e s m e t h o d s m e t h o d s a l g o r i t h m s a l g o r i t h m s r e l a t i o n s h i p s r e l a t i o n s h i p s m e s s a g i n g m e s s a g i n g b e h a v i o r b e h a v i o r c o n t r o l c o n t r o l OOA and OOD A n a l y s i s M o d e l D e s i g n M o d e l A n a l y s i s M o d e l D e s i g n M o d e l (design classes)

  5. 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. 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. Process Flow for OOD

  8. System Design Process • Partition the analysis model into subsystems. • Identify concurrency that is dictated by the problem. • Allocate subsystems to processors and tasks. • Develop a design for the user interface. • Choose a basic strategy for implementing data management. • Identify global resources and the control mechanisms required to access them. • Design an appropriate control mechanism for the system, including task management. • Consider how boundary conditions should be handled. • Review and consider trade-offs.

  9. System Design

  10. Subsystem Example

  11. Subsystem Collaboration Table

  12. 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. 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. 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. 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. 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. Object-Oriented High-Level Design Client Server DB Server Environment Environment Environment Compaq Server NT Visual Basic MSMQ SNA Server (COMTI) Mainframe IBMXXX MVS CICS Cobol Programs Compaq PC NT Visual Basic ….. IMS Access SQL - 7 Crystal Reports Hand Readers Cameras VB Screens

  18. Object-Oriented High-Level Design Client Server DB Server Environment Environment Environment SNA Server(COMTI) TCPIP CICS Trans T1 Line TCPIP MSMQ Messages T1/transactions Twisted Pair Compaq Server NT Visual Basic MSMQ SNA Server (COMTI) Mainframe IBMXXX MVS CICS Cobol Programs Compaq PC NT Visual Basic ….. IMS Access SQL - 7 Crystal Reports Hand Readers Cameras VB Screens

  19. 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. Object-Oriented High-Level Design Client Server DB Server Environment Environment Environment Thick/Thin Servlets ? Databases UI Database Classes

  21. Class Diagrams Cassette cassetteID: int cassetteVolumeNo: int rentMovie() ClassName Video Rental System Multiplicity Customer 1..* 1..* attributes rents CID: int name: String authenticateCustomer () methods relationship

  22. 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. Class Diagrams Movie Distributor distributorID: String Distributor Name: String ……. movieID: int movieName: String Customer orderMovie() trackOrder() CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Video Rental System – domain classes

  24. Class Diagrams Movie Distributor Party distributorID: String Distributor Name: String ……. ……. movieID: int movieName: String Customer orderMovie() trackOrder() CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Video Rental System – analysis patterns

  25. Class Diagrams Movie movieID: int movieName: String Rental View (s) Movie View(s) Party View(s) Party orderMovie() CID: int name: String CID: int name: String CID: int name: String authenticateCustomer () authenticateCustomer () authenticateCustomer () CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Video Rental System + interface classes

  26. Class Diagrams Database Class Movie Movie Table movieID: int movieName: String Rental View (s) Movie View(s) Party View(s) Party orderMovie() CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Cassette Table Rental Table Party Table Video Rental System + database classes

  27. Use Case Diagrams System Video Rental System Order new videos Use Case Rent video Corporate Enroll Customer Return video Actor Customer

  28. Class Diagrams Database Class Rent Video Enroll Customer Return Video Movie Movie Table movieID: int movieName: String Rental View (s) Movie View(s) Party View(s) Party orderMovie() CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Cassette Table Rental Table Party Table Video Rental System + use case classes

  29. Class Diagrams Database Class Return Video Enroll Customer Rent Video Rent Video View Movie Movie Table movieID: int movieName: String Rental View (s) Movie View(s) Party View(s) Party orderMovie() CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Cassette Table Rental Table Party Table Use case views Video Rental System + use case views

  30. Class Diagrams Database Class Return Video Enroll Customer Rent Video Rent Video View Movie Movie Table movieID: int movieName: String Rent Video Ctrl Movie View(s) Rental View (s) Party View(s) Movie Ctrl Party Ctrl Rental Ctrl Party orderMovie() CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Cassette Table Rental Table Party Table Video Rental System + application patterns

  31. Class Diagrams Database Class Return Video Enroll Customer Rent Video Rent Video View Movie Movie Table movieID: int movieName: String Rent Video Ctrl Movie View(s) Rental View (s) Party View(s) Movie Ctrl Party Ctrl Rental Ctrl Party orderMovie() CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Cassette Table Rental Table Party Table Video Rental System + application patterns

  32. Class Diagrams Database Class Return Video Enroll Customer Rent Video Rent Video View Movie Movie Table movieID: int movieName: String Movie View(s) Party View(s) Rental View (s) Rent Video Ctrl Movie Ctrl Rental Ctrl Party Ctrl Party orderMovie() CID: int name: String Cassette Rental cassetteID: int customerID: int dateRented: date cassetteID: int cassetteVolumeNo: int authenticateCustomer () rentMovie() rentMovie() Cassette Table Rental Table Party Table Rental Report Video Rental System + application patterns

  33. Class Diagrams Video Rental System + design patterns Rent video rental error msg produce error msg format read output invalid rental Calculate Rental fee trans Set Proce validate trans Types: Children Current Classic ….. determine type Set price calculate Rental fee …… format output

  34. Class Diagrams Movie movieID: int movieName: String orderMovie() Current Movie Classic Movie Children Movie Video Rental System + design patterns Rent video

  35. Class Diagrams Rent Video Movie movieID: int movieName: String orderMovie() Children Movie MovieFactoryIF MovieFactory Current Movie Classic Movie Factory Video Rental System + design patterns Rent video

  36. Class Diagrams Rental Report Rent Video Linee ClassicLinee ChildrenLine MovieFactoryIF MovieFactory Report IF Report Builder CurrentLine Builder Video Rental System + design patterns Rent video

  37. Use Case Diagrams System Video Rental System Order new videos Use Case Enroll Customer Corporate Rent video Return video Actor Customer

More Related