Contacts

06 February 2009

DANGER: Wrong example diagram in my UML book module.

When I was studying UML Diagrams using my module, there was something which made me to think twice and I was asking by myself; “Is this true, false or just incomplete?” Then I try to analyze and imagine about implementation of that diagram. Then I was sure that if this diagram is implemented in real life, it will be danger. Absolutely.

Now take a look at the picture below,

this is the example of Activity diagram in my UML book module. This is the activity diagram of customers of a bank to take their money on ATM. After the customers inserts ATM card then customer asked by machine to enter PIN. Then PIN will be validate, if customer enter the wrong PIN then the machine asked to enter it again, otherwise customer can continue to the transaction menus. There is wrong flow on the pictures (mistake?), the wrong flow I blocked using red color. Now keep your eyes on the red block. When the customer enters amount of money to be taken, there are no validation between current account and the amount that will be taken. If this diagram implemented in real project, it will be very dangerous. What will be happen is, the customers can take amount of money as they want. Just imagine, said that I have $500 in my account and then I take more than it, for example I take $1 00.000 , based on the diagram above I can do this, off course it hasn’t to be allowed. It must be forbidden by ATM machine. So the diagram have to implement validation which check between the amount of money will be taken and the current account, by implementing this validation the customers will be forbidden if they take the amount of money greater than their current account.

Although it is an example, but I think it’s is very important to be understood for the beginner.

No comments:

Post a Comment