Object Oriented Programming using C#
The Unified Modelling Language (UML)
Activity 1
Draw a diagram to represent a class called ‘BankAccount’ with the attribute balance (of type int) and methods
DepositMoney(), WithdrawMoney() and DisplayBalance(). Show appropriate visibility modifiers.
Feedback 1
BankAccount
- balance :int
+DepositMoney()
+WithdrawMoney()
+DisplayBalance()
The diagram above shows this information
UML allows us to suppress any information we do not wish to highlight in our diagrams – this allows us to suppress
irrelevant detail and bring to the readers attention just the information we wish to focus on. Therefore the following are
all valid class diagrams...
Challenging? Not challenging? Try more
Try this...
Please click the advert