1 / 32

OOAD

OOAD. Adapted from Object Oriented Analysis and Design Methodology A Tech Talk by Ed Sullivan. Today’s Discussion. Background – Why OO is hot OO Methodology – Java Factory Approach Hands on application of CRC Methodology. Object Oriented Headlines.

baka
Download Presentation

OOAD

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. OOAD Adapted from Object Oriented Analysis and Design Methodology A Tech Talk by Ed Sullivan

  2. Today’s Discussion • Background – Why OO is hot • OO Methodology – Java Factory Approach • Hands on application of CRC Methodology

  3. Object Oriented Headlines “Object-Oriented Technology Ventures Into the Real World” “IBM unveils new object-oriented middleware” “Expo to serve up object-oriented products” “Object-Oriented is Here to Stay”

  4. Motivation For OOAD Traditional Methodologies are broken because… • They haven’t solved problems of quality and timeliness. • They separates data from procedures making software reusability more difficult. • They don’t work well in our non-linear world.

  5. Linear vs. Non-linear Linear Non-Linear Page 1 Page 2 Step 1 Step 2 Page 3 Page 4 Step 3

  6. OOAD Vs. Traditional Approach • Process is less rigorous • Analysis Paralysis • Process is more fluid • Waterfall vs. Onion • No definitive stopping point • How many iterations? • More Trial and Error… “I failed my way to success.” Thomas Edison

  7. OOAD Methodology Roots • Unified Modeling Language(UML) • Use Cases • Class Diagrams • Sun Microsystems Java factory • CRC Methodology • Class • Responsibility • Collaboration

  8. Defining the Process • Determine the Requirements • Identify the Classes and Objects • Describe the Object Collaborations and the classes • Sketch the User Interface

  9. Diagram of OOAD Class Diagram Determine Requirements Identify Classes & Objects Describe Collaboration Sketch Interface ColloborationDiagrams Interface Sketch Summary CRC Cards

  10. Determining Requirements • Summary Paragraph • Define general approach to solving problem • Emphasize the what and not the how • Describe all major functions(operations/methods) • Define boundaries

  11. Sample Problem Summary

  12. Identifying Classes and Objects • CRC Card Preparation • Class(data attributes) • Responsibility(Message response) • Collaboration(Class interaction)

  13. Class Definition • Classes are the templates or blueprints for objects • Classes define the attributes and behavior(methods) for objects • Objects contain the data and the methods • Objects are the nouns of the Object Oriented world

  14. So how do you define Classes?? 1) Read Problem Summary statement for nouns and noun phrases which may be physical objects, concepts, categories of objects or attributes of other objects. Create a list of all of these items. 2) Review list for Class candidates. Transfer classes to CRC card.

  15. Sample Problem Summary

  16. Noun Phrases • Renter Application • Bugs • Inventory • User • Message

  17. Transitioning Nouns to Classes • Not always easy • Iterative • Experience • Steps… • Logical Groupings and Leveling • Identify Implied Classes • Eliminate noise(primitives, attributes, messages) “Design Decisions have no obvious right and wrong answers.”

  18. Renter Application Bugs Inventory User Message Logical Groupings/Leveling Implied Classes Noise elimination Noun Phrases Class Steps

  19. So what are the Classes of the Bug Rental Application?? • Renter • Lender • Inventory

  20. CRC Card - Front Class: Renter Responsibilities: Collaborations: (Front of Card)

  21. Defining Responsibilities • Use Problem Statement to identify verbs • Logical group and organize action items • Match Method to Class • Adjust for any omissions

  22. Track Inventory Rent Bug Decrease Inventory Return Bug Increase Inventory Display Message Logical Grouping Leveling Match Method to Class Method Verbs Identification

  23. Renter Rent Bug Return Bug Display Message Lender Rent Bug Return Bug Supply Message Bug Rental Methods

  24. Describing Collaboration • Develop Use-case scenarios • Sequence of related events • Walk Through Use-cases • Identify message exchanges • Identify missed Classes

  25. Identify Use-Case Scenarios • Customer Rents a Bug • ) Customer enters request for bug • ) Lender checks inventory for bug availability • ) If inventory is greater than zero • Inventory is decreased by one • Bug is made available to Customer • Message is sent to Customer from Lender • ) If inventory is zero, error message is sent to customer from Lender

  26. Now it’s your turn…Develop Use-Case for Bug Returns • Customer returns bug • Lender increases inventory • Lender sends message to Customer

  27. CRC Card - Front Class: Renter Collaborations: Responsibilities: Lender Lender N/A Rent Bug Return Bug Display Message (Front of Card)

  28. Identifying Attributes • Characteristics of Class • Adjectives of the Object Oriented World • Inventory Example • Bug ID • Bug Description • Bug Version

  29. Your turn again…Develop some common attributes for the Renter • Customer Name • Customer Address • Customer Status • Customer Rentals • Customer Balance

  30. CRC Card - Back Attributes:

  31. Developing a Class Diagram Class Name Attributes Methods

  32. CRC Adjustments • Create new CRC cards • Trash invalid CRC cards • Challenge yourself • Not a cookbook • Process is not magic;requires critical thinking skills • Iterate!

More Related