UML Class Diagrams: Zaid Bin Abid 2213173
UML Class Diagrams: Zaid Bin Abid 2213173
• The above UML diagram shows that a house has exactly one kitchen, exactly one
bath, at least one bedroom (can have many), exactly one mailbox, and at most one
mortgage (zero or one).
ATM
• The ATM class represents a physical ATM.
• Right off the bat, we can come up with three methods for
the ATM:
– withdraw()
– deposit()
– checkBalance()
• Each of these methods takes the card number as input.
• In terms of attributes, an ATM has a location and is
managed by a specific bank.
Customer
• The customer class represents a real customer.
• This customer has a
– name
– address
– date of birth (dob)
– card number
– pin
Account
• The account class represents a bank account.
• Common attributes of bank accounts include
– account number
– balance
– And more
• You can deposit() withdraw() money from the account.
• In addition, banks might offer two types of accounts:
– A checking account
– A savings account.
– These two can thus be considered child classes of the account class and can inherit from
it too.
– We’ll denote this by using a solid black line with an unfilled arrow going into the account
class.
Completed Diagram