Requirments:
1. The ATM should be able to perform only a single transaction at a time. We should be throwing error
when some one is trying to make more than one transaction at a time.
2. User should be able to insert a valid card and can perform operations like
withdrawals
balance inquiries (Limiting the number of operations to simulate interview)
And if the entered card is not valid then we should be throwing respective error.
3. And before performing each of the operations we will be asking the users the card PIN and we let the user's
type the PIN and if the PIN is valid we proceed to the next operation.
And we should have proper PIN validation logic for the respective card and how many times the
pin has been entered should be tracked in the server side.
4. And also the user will be able to cancel the transaction from different states of the whole
transaction and if the user is trying to cancel the transaction from a invalid state we should be
throwing error.
5. And we need to have checks like before performing operations like before performing the withdraw operation
we should be able to check the card has the enough balance
And the atm has the enough money that is requested.
And the maximum amount we can withdraw in a day.
And while performing these checks if there are checks that are not followed we will be throwing proper error.
Based on the requirements and use cases, identify the main objects of the system and analyze how they interact and relate to each other...
For each class, define the attributes (data) it will hold and the methods (functions) that operate on the attributes. Ensure they align with the object's responsibilities and adhere to the principle of encapsulation.
public class Car { ... } // ExampleExplain design tradeoffs you considered. Check and explain whether your design adheres to SOLID principles. Explain how your design can handle changes in scale and whether it would be easy to extend with new functionalities. Identify areas for future improvement...