1 / 51

Object-Oriented analysis and design

Object-Oriented analysis and design. Special nature of OO development Use cases Design with UML OO system design OO program design OO measurements. Object orientation. identity abstraction classification encapsulation inheritance polymorphism persistence. Objects and classes.

march
Download Presentation

Object-Oriented analysis and 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. Object-Oriented analysis and design • Special nature of OO development • Use cases • Design with UML • OO system design • OO program design • OO measurements Chapter 6

  2. Object orientation • identity • abstraction • classification • encapsulation • inheritance • polymorphism • persistence Chapter 6

  3. Objects and classes • Every object has a name (also called a reference or handle). • Objects can have attributes (such as color, size, location). • Objects can have operations or behaviors (such as takeoff, land, repair). • Each object is an instance of a class. • A specific implementation of an operation for a certain class is called a method. Chapter 6

  4. Classification Chapter 6

  5. Forming a hierarchy Chapter 6

  6. Chapter 6

  7. OO design • Usually uses an OO requirements representation • System design identifies and represents objects and classes, plus details of each objects attributes and behaviors. • System design also identifies interactions and relationships. • Program design inserts computational features in the models. • Program design inserts class library details. • Program design considers nonfunctional requirements to enhance design. Chapter 6

  8. OO and testing Chapter 6

  9. Use cases • Diagrams have four elements: • actors • cases • extensions • uses Chapter 6

  10. Identifying participants • What users or groups use the system to perform a task? • What users or groups are needed so that the system can perform its functions? • What external systems use the system to perform a task? • What external systems, users or groups send information to the system? • What external systems, users or groups receive information from the system? Chapter 6

  11. Example: Service station Chapter 6

  12. Service station use case diagram 1 Chapter 6

  13. Service station use case diagram 2 Chapter 6

  14. Service station use case diagram 3 Chapter 6

  15. UML and the OO process • Workflow diagrams • Object model • Sequence diagrams • Collaboration diagrams • Package diagrams • Component diagrams • Deployment diagrams Chapter 6

  16. UML support for development process Chapter 6

  17. First cut at object classes • Structures • External systems • Devices • Roles • Operating procedures • Places • Organizations • Things that are manipulated by the system to be built Chapter 6

  18. Class box example Chapter 6

  19. Inheritance relationship Chapter 6

  20. Association relationship Chapter 6

  21. Types of class relationships Chapter 6

  22. UML notes and qualifies Chapter 6

  23. Service Station – first take Chapter 6

  24. Service Station – second take Chapter 6

  25. Service Station – final cut Chapter 6

  26. Class name: refuel Category: service External documents: Export control: Public Cardinality: n Hierarchy: Superclasses: services Associations: fuel in association <name> Operation name: price Public member of: refuel Documentation: // Calculates fuel final price Preconditions: gallons > 0 Object diagram: (unspecified) Semantics: final_price = gallons * price Object diagram: (unspecified) Concurrency: sequential Public interface: Operations: price Private interface: Attributes: gallons price Implementation: Attributes: gallons price State machine: no Concurrency: sequential Persistence: transient Chapter 6

  27. Service Station – package diagram Chapter 6

  28. Sequence Station – sequence diagram for the refuel use case Chapter 6

  29. Service Station – collaboration diagram for the perking use case Chapter 6

  30. State diagram example Chapter 6

  31. State diagram for Fuel class Chapter 6

  32. State diagram for Part class Chapter 6

  33. State diagram for Inventory class Chapter 6

  34. Activity diagram Chapter 6

  35. Activity diagram for Inventory class Chapter 6

  36. Guidelines for building classes • What needs to be “processed” in some way? • What items have multiple attributes? • When do you have more than one object in a class? • What is based on the requirements themselves, not derived from your understanding of the requirements? • What attributes and operations are always applicable to a class or object? Chapter 6

  37. Guidelines for identifying behaviors • Imperative verbs • Passive verbs • Actions • Things or reminded events • Roles • Operating procedures • Services provided by an organization Chapter 6

  38. Program design considerations • Nonfunctional requirements • Reused components • Reusable components • User interface requirements • Data structure and management details Chapter 6

  39. Transition from paper to screen Chapter 6

  40. Possible design for new billing screen Chapter 6

  41. Implementing classes using relational database Chapter 6

  42. Observer pattern - relationships Chapter 6

  43. Observer pattern – sequence diagram Chapter 6

  44. Chapter 6

  45. Chapter 6

  46. Object-oriented view of the Service Station Chapter 6

  47. Class hierarchy for the Service Station Chapter 6

  48. Chapter 6

  49. Measuring Service Station system design Chapter 6

  50. Measuring Service Station program design Chapter 6

More Related