Consider a software model of an ATM machine that supports the following use cases:
Use Case 1:
1. User swipes his/her debit card, which provides the system with the user's bank account number.
2. User is asked to provide his/her pin number.
3. User is asked whether he/she wishes to check his balance or withdraw money.
4. User selects to withdraw money.
5. System displays the amount withdrawn and the remaining balance.
6. User is asked whether he/she would like to conduct another transaction.
Use Case 2:
1. User swipes his/her debit card, which provides the system with the user's bank account number.
2. User is asked to provide his/her pin number.
3. User is asked whether he/she wishes to check his balance or withdraw money.
4. User selects to withdraw money.
5. System displays error message that the amount to be withdrawn exceeds the balance.
6. User is asked whether he/she would like to conduct another transaction.
Use Case 3:
1. User swipes his/her debit card, which provides the system with the user's bank account number.
2. User is asked to provide his/her pin number.
3. User is asked whether he/she wishes to check his balance or withdraw money.
4. User selects to check balance.
5. System displays the user's account balance.
6. User is asked whether he/she would like to conduct another transaction.
Use Case 4:
1. User swipes his/her debit card, which provides the system with the user's bank account number.
2. User is asked to provide his/her pin number.
3. System displays that pin number is incorrect.
4. User is asked to provide his/her pin number up to two more times.
5. System terminates after third failed attempt.
Problem 1: Identify at least three classes that may be required in an object oriented design that supports the above use cases. Generate a CRC card for each class indicating its responsibilities and collaborators. Hint: One of your classes should be BankAccount.
Problem 2: Generate a UML class diagram showing the classes and any relationships between them. Be sure to include a list of the attributes and methods of each class in the diagram.
Problem 3: Implement your design in Java. You should have a separate source file for each class as well as a tester class for demoing the functionality of your design.