Skip to content

Extension 4: Time simulation

Compare
Choose a tag to compare
@jeffreybakker jeffreybakker released this 04 Aug 14:30
· 42 commits to master since this release

For some components of the banking system, time plays an important role, for example the expiration date of a PIN card.

The task of this assignment was to give the bank system its own date and time, separate from the actual date and time (even though these should initially be the same). The date of the system should be just as persistent as your other data. The bank should only use this date and time for all actions involving a date, such as processing a transaction or checking if a PIN card is expired.

A user should be able to manipulate this time via an API call, see the methods:

  • simulateTime
  • reset
  • getDate