CSCI 3132 - Assignment 5- Reuse with Components


  • 作业标题:CSCI 3132 - Assignment 5: Reuse with Components
  • 课程名称:Dalhouse University CSCI 3132 Object Orientation and Generic Programming
  • 完成周期:2天

You work for a small Canadian credit union. You have developed a JavaBean component called
BankAccountBean that provides basic deposit and withdraw functions and notifies listeners
when large transactions are made and when an account’s balance goes below a threshold.
Review the BankAccount* and Account* code and run the test code to see the current
behavior.

。。。

Part A: Connecting Components

You want to add transaction recording functionality for bank accounts. A transaction is any operation that changes an account’s balance. Rather than implement this from scratch, you purchase a TimestampedEventRecorder component from Beans-R-Us, Inc1. Now you need to connect this component to your bank account component.

Review the TimestampedEvent* code and run the test code to see the current behaviour.

。。。

Part B: Composing Components

The credit union is planning to provide online banking services. Desired features include:

  • Depositing into an account.
  • Withdrawing from an account.
  • Getting an account’s balance.
  • Transferring funds from one account into another account.
  • Reviewing the past N transactions for a given account (output these to the console).

。。。

Marking Scheme (/20)

5 BankAccountBean generates TimestampedEvents for all transactions.
3 Test code for BankAccountBean updated according to specifications in part A.
5 Methods implemented in OnlineBanking class for each of the 5 features.
2 OnlineBanking follows the façade design pattern.
2 No changes are made to existing code for part B.
3 Online banking test class created according to specifications in part B.

Completing the bonus provides up to 4 marks – anything above 20 will be incorporated into
your final assignment mark.


文章作者: IT神助攻
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 IT神助攻 !
  目录