There is function in ATM class:
public boolean makeTransaction(Customer customer, Transaction transaction);
There can be another approach of creating an object of transaction class in ATM and makeTransaction function will lie in Transaction class.
- Please let us know what are the pros and cons of the two designs.
- What should be criterion for selecting one out of two designs i.e how to justify your selection.