Requirements:
1. User Insert the ATM
2. Insert PIN
3. Select account Type
4. Withdraw amount
6. If amount is not suffiecint cancel the trasaction
List the key non-functional requirements (eg thread safety, extensibility, maintainability, etc.)...
Flow and Objects
User comest to ATM and insert CARD and validate
once validated he can checks balance and withdraw Amount
Objects:
ATM
Card
Note
Authenticate
AccountDetails()
Relationship:
Association -> ATM uses authentication
compoistin(weak)-> ATM has account details
Assocication-> ATM uses note
Compoistion(weak) -> FiveHundread has TwoHundread and TwoHundread has one
Inheritatnce ->Child inherted Note
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. Write your code in the code editor below.
Solid Principle
SRP:
Note has only process own currency doesn't do authentication
OCP
adding new note doesn't need any existing logic to break we can add new note type
LCP:
Note should inheritate all it's method
ISP:
child is not implemented any method which are not neccessary
DIP:
authenticate doesn't know how it works it call only authenticate method
Design Pattern:
1. Chain of responsibility ->
2 Adapter pattern