Lecture 4 - Some Advanced Design Techniques by UML
Lecture 4 - Some Advanced Design Techniques by UML
More possibilities:
o Is the collection empty ?
o Make the collection empty
o Give a subset of the collection
Program logic formulation
ADT in Data Structures
ADT in Data Structure
Java Abstract Data Type
Hardware requirements:
o A screen
o A keypad
o A cash dispenser
o A deposit slot
Sequence of events:
1. Screen displays welcome
and prompts the user to
enter account number
2. User input account number
3. Screen prompts user to
enter PIN
4. User enters PIN
5. System validates PIN. If
correct, displays main
menu. If incorrect, restarts
the step 1
ATM withdrawal menu
Step 1- Examine the ATM requirements
Withdrawal sequences:
1. Screen displays menu
2. User enters menu selection
3. System validates the
chosen amount. If invalid,
return to step 1, else move
to step 4
4. If enough cash, moves to
step 5. Otherwise, shows a
message then return to
step 1
5. ATM subtracts the
withdrawal amount in
user’s account balance ATM withdrawal menu
6. ATM dispenses desired
amount to user
7. Screens show reminders to
user to take the money
Step 1- Examine the ATM requirements
Use case diagram for the ATM system from the User’s view
Step 2 - Identify the Classes
Activity diagram
for a Withdrawal
transaction
Step 5 - Identify the Class Operations
Classes in the
ATM system
with attributes
and operations
Step 5 - Identify the Class Operations
Class BankDatabase
Class Account
Step 6 - Indicate collaboration among objects
Collaborations in the
ATM system
Step 6 - Indicate collaboration among objects