Entity: Account 159 299 null * accountId String 3 false true false name String 3 false false false balance double 3 false false false overdraftLimit double 3 false false false kind AccountKind 3 false false false Operation: withdraw Account void amt double balance - amt >= -overdraftLimit balance = balance - amt Operation: deposit Account void amt double amt >= 0 balance = balance + amt Entity: Customer 475 83 null * abstract name String 3 false false false age int 3 false false false address String 3 false false false customerId String 3 false true false Operation: totalFunds Customer double query true result = accounts->collect(balance)->sum() Entity: PersonalCustomer 446 341 Customer * Entity: BusinessCustomer 621 236 Customer * Type: AccountKind 223 13 current deposit savings Association: Customer Account 0 468 96 246 291 0 accounts customers Generalisation: Customer PersonalCustomer 505 343 506 184 Generalisation: Customer BusinessCustomer 644 238 643 186 Entity: Transaction 718 476 null * operationKind String 3 false false false amount double 3 false false false Association: Account Transaction -1 440 410 715 480 0 transactions main ordered Association: Transaction Account 0 720 522 294 440 -1 secondary null 353 520 GeneralUseCase: checkBalance aId String false Constraint: null aId : Account->collect(accountId) Account[aId].balance->display() null checkBalance false Constraint: null aId /: Account->collect(accountId) ( "No account with id = " + aId )->display() null checkBalance false GeneralUseCase: newAccount aId String false Constraint: null aId : Account->collect(accountId) ( "Error: account already exists with id = " + aId )->display() null newAccount false Constraint: null aId /: Account@pre.accountId Account->exists( a | a.accountId = aId ) null newAccount false GeneralUseCase: addCustomerAccount cId String aId String false Constraint: null cId /: Customer->collect(customerId) ( "Error: no customer with id = " + cId )->display() null addCustomerAccount false Constraint: null cId : Customer->collect(customerId) & cust = Customer[cId] Account->exists( a | a.accountId = aId & a : cust.accounts ) null addCustomerAccount false GeneralUseCase: removeCustomerAccount cId String aId String false Constraint: null cId /: Customer->collect(customerId) ( "Error: no customer with id = " + cId )->display() null removeCustomerAccount false Constraint: null cId : Customer->collect(customerId) & cust = Customer[cId] cust.accounts = cust.accounts - Set{Account[aId]} null removeCustomerAccount false GeneralUseCase: deleteAccount aId String false Constraint: null aId /: Account->collect(accountId) "Error: account already deleted"->display() null deleteAccount false Constraint: null aId : Account@pre.accountId Account[aId]->isDeleted() null deleteAccount false