Thursday, October 18, 2012

ATM Machine - Class Diagram Example

UML Class diagram for ATM Machine is shown below. The various Classes involved in the system are:

Class: Bank, Account, Customer, Debit Card, Current Account, Saving Account, ATM Info, ATM Transaction, Withdraw Transaction, Change Pin, Transfer Money, Check Balance.

Here, in this system there could be two types of Account: Current Account and Saving Account. Both use to share many of the properties and methods. So, we defined a new class that is Account and from it both Current and Saving Account class inherits properties and methods. Here, Account is basically an abstract class as any account need to be current or saving.

Again, at ATM Machine one can perform multiple tasks like Withdrawing cash, change pin , check balance and Transfer Money. We created a generalized class that is, ATM Transaction and from it all the other four types of classes get specialized. All of them share multiple properties and methods. They are kept in super class and further have their own methods and properties to define. Here, ATM Transaction is also an Abstract Class.

The Class diagram for ATM Machine is shown below:-


Kindly Post Your Comment and queries related to the article.


 Related Articles
 Class Diagram Examples

No comments:

Post a Comment

Post a Comment