3: Design

Important dates

Mon 24 Oct

Meeting 4: (Module 3) Design strategies: CRC cards, objects, coupling and cohesion, and a brief intro to UML.

Sun 30 Oct

Assignment 3a due at 23:59: Draft design document.

Sun 6 Nov

Assignment 3b due at 23:59: Final design document.

Mon 7 Nov

Meeting 5: (Modules 3–4) Simulated design meeting for assignment 3. Implementation concerns: selecting tools, languages, platforms, and libraries.

Resources

Assignment

Below is a partial design for some system, and a set of tasks for understanding, refactoring, and expanding the design.

Problem statement

We present the design of a simplified Automated Teller Machine (ATM). I’m sure you know generally how to use an ATM, but here are specific requirements for our system:

  1. The ATM consists of a display, a keypad, a magnetic stripe reader that can `swallow’ the card, a dispenser for cash, a receipt printer, a deposit acceptor, and a communications link to the bank.

  2. The machine serves one user at a time.

  3. It accepts the ATM card and asks the user to enter a personal identification number (PIN) on the keypad.

  4. The card ID and PIN will be sent to the bank for authentication of each transaction.

  5. If authentication fails three times in a row due to invalid card data or incorrect PIN, the machine will retain the card. Otherwise it returns the card when the customer signifies he/she is finished requesting transactions.

  6. If authentication or transactions fail due to communication failure, the ATM will return the card with an error message, then go into an offline/out-of-service mode to await maintenance.

  7. The offline mode is also triggered if the receipt printer is out of paper or jammed.

  8. Multiple accounts can be linked to the same card, so users will have to select the account by name or number.

  9. A customer may withdraw cash from any account linked to the card, assuming sufficient balance.

  10. The maximum cash withdrawal is $400, and the minimum is $20 (in multiples of $20 only).

  11. A customer may inquire about the balance of any account linked to the card. The balance is presented on a printed receipt, rather than on the screen.

UML diagrams

The following diagrams are hosted on Google Docs. You can click to download a PNG image, or save a duplicate copy into your own Google account to edit it.

Tasks for part 3a

Tasks for part 3b

Three new requirements have been added:

  1. A customer may transfer money from one account to another.
  2. A customer may deposit cash or checks using the “deposit acceptor.”
  3. The ATM must keep a log of all transactions, whether they succeed or fail.

Incorporate them in the following tasks:

©2011 Christopher League · some rights reserved · CC by-sa