Presentation is loading. Please wait.

Presentation is loading. Please wait.

OOAD Adapted from Object Oriented Analysis and Design Methodology A Tech Talk by Ed Sullivan.

Similar presentations


Presentation on theme: "OOAD Adapted from Object Oriented Analysis and Design Methodology A Tech Talk by Ed Sullivan."— Presentation transcript:

1

2 OOAD Adapted from Object Oriented Analysis and Design Methodology A Tech Talk by Ed Sullivan

3 Today’s Discussion n Background – Why OO is hot n OO Methodology – Java Factory Approach n Hands on application of CRC Methodology

4 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”

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

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

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

8 OOAD Methodology Roots n Unified Modeling Language(UML) –Use Cases –Class Diagrams n Sun Microsystems Java factory –CRC Methodology n Class n Responsibility n Collaboration

9 Defining the Process n Determine the Requirements n Identify the Classes and Objects n Describe the Object Collaborations and the classes n Sketch the User Interface

10 Diagram of OOAD Class Diagram Determine Requirements Identify Classes & Objects Describe Collaboration Sketch Interface SummaryCRC Cards Colloboration Diagrams Interface Sketch

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

12 Sample Problem Summary

13 Identifying Classes and Objects n CRC Card Preparation –Class(data attributes) –Responsibility(Message response) –Collaboration(Class interaction)

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

15 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.

16 Sample Problem Summary

17 Noun Phrases n Renter Application n Bugs n Inventory n User n Message

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

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

20 So what are the Classes of the Bug Rental Application?? n Renter n Lender n Inventory

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

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

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

24 Bug Rental Methods n Renter –Rent Bug –Return Bug –Display Message n Lender –Rent Bug –Return Bug –Supply Message

25 Describing Collaboration n Develop Use-case scenarios –Sequence of related events n Walk Through Use-cases –Identify message exchanges –Identify missed Classes

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

27 Now it’s your turn… Develop Use-Case for Bug Returns Ê Customer returns bug Ë Lender increases inventory ¸ Lender sends message to Customer

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

29 Identifying Attributes n Characteristics of Class n Adjectives of the Object Oriented World n Inventory Example –Bug ID –Bug Description –Bug Version

30 Your turn again… Develop some common attributes for the Renter n Customer Name n Customer Address n Customer Status n Customer Rentals n Customer Balance

31 CRC Card - Back Attributes:

32 Developing a Class Diagram Class Name Attributes Methods

33 CRC Adjustments n Create new CRC cards n Trash invalid CRC cards n Challenge yourself –Not a cookbook –Process is not magic;requires critical thinking skills n Iterate!


Download ppt "OOAD Adapted from Object Oriented Analysis and Design Methodology A Tech Talk by Ed Sullivan."

Similar presentations


Ads by Google