150 likes | 281 Views
This tutorial focuses on object-oriented design principles, specifically for an ATM system. It covers gathering requirements such as user account management, balance viewing, and cash withdrawal/deposit functionalities. We explore identifying classes derived from key nouns and relationships, defining attributes based on descriptive terms, and determining methods from action verbs. Additionally, it emphasizes the use of UML diagrams, including use case and class diagrams, to visualize system interactions. A practical guide for understanding and implementing design concepts in software development.
E N D
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 • Cash dispenser begins each day loaded with 500 $20 bills. • Simulate the process inside a computer screen keypad cash dispenser deposit slot
Use case diagram • A type of UML diagram (among 13) • show the kinds of interactions
Identifying the classes • Derived from key nouns and noun phrases • Pick out important and relevant candidacies
Have-a relationship • a bit different from that in Prof. Tam’s slides
Finding attributes • Derived from descriptive words and phrases that refer to characteristics of the classes • Pick out the important words and phrases
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
The end • Thank you!