«interface»
Statement
+ print()
Account
- balance: int
- owner: String
+ withdraw(amt)
+ deposit(amt)
TransactionLog
+ record(txn)
SavingsAccount
+ addInterest()
Notifier
+ send(msg)
The class diagram — structure
1interface Statement { print() }23class Account implements Statement {4 - balance: int5 + withdraw(amt) { ... }6}78class SavingsAccount extends Account { }
State
+ / − / #public / private / protected