• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ATM simulation

 
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I must thank Russell C. Bjork for letting other people to learn via its ATM simulation example
I have a doubt about the multiplicity of two associations in the class diagram
The association ends Session and Transaction of the associations between ATM and Session, and Session and Transaction are *. However an ATM instance is going to be related only to one Session at the same time. Shouldn't be thefore 1?. Similar rationale can be applied to the Session Transaction relationship.
Looking at the class ATM you will see that the relationship ATM-Session wasn't implemented as ATM class having a container of Sesssion objects, but as a local variable within the method run. This implementation suggest a dependency relationship, because the visibility from ATM to Session is not an attribute visibility but a local one.
Looking at the class Session you won't see a container of Transactions as a field of session, but a local variable within performTranscation method. Again this doen't adjust well to the class diagram.
I cannot expect you will read all the documentation to reply to me. You can get by only with the use cases and interaction diagrams.

ATM simulation 2
ATM simulation 3
ATM simulation 4
[ September 03, 2002: Message edited by: Jose Botella ]
[ September 03, 2002: Message edited by: Jose Botella ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic