1 / 15

CPSC 233 Tutorial

CPSC 233 Tutorial. Xin Feb 7, 2011. Object Oriented Design. Gathering requirements Finding the classes Finding the attributes Finding the methods. ATM -- requirements. A user has only one account A user can view balance, withdraw, and deposit

odeda
Download Presentation

CPSC 233 Tutorial

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. CPSC 233 Tutorial Xin Feb 7, 2011

  2. Object Oriented Design • Gathering requirements • Finding the classes • Finding the attributes • Finding the methods

  3. ATM -- requirements • A user has only one account • A user can view balance, withdraw, and deposit • Cash dispenser begins each day loaded with 500 $20 bills. • Simulate the process inside a computer screen keypad cash dispenser deposit slot

  4. Use case diagram • A type of UML diagram (among 13) • show the kinds of interactions

  5. Identifying the classes • Derived from key nouns and noun phrases • Pick out important and relevant candidacies

  6. Have-a relationship • a bit different from that in Prof. Tam’s slides

  7. Class diagram with Withdrawal

  8. Class diagram with Deposit

  9. Finding attributes • Derived from descriptive words and phrases that refer to characteristics of the classes • Pick out the important words and phrases

  10. descriptive words

  11. Class Attributes

  12. Finding methods • Derived from key verbs and verb phrases • determine methods • some methods need cooperation of more than one classes • determine parameters • determine return types

  13. verbs

  14. methods

  15. The end • Thank you!

More Related