educative.io

Will Atm will have the objct of the card reader and all

class ATM{

int id;
String name;
Address address;

//atm will have these printer and all and we will getiing imput fromt hte 
private CardReader cardReader;
private CashDispenser cashDispenser;
private Keypad keypad;
private Screen screen;
private Printer printer;   ???????????????????????????????????????

Course: Grokking the Low Level Design Interview Using OOD Principles - Learn Interactively
Lesson: Code for the ATM System

Hello @Sahil_Siddiqui,

Yes, according to the implementation of the ATM Design you provided, the ATM class has objects for the various components required for ATM operations. These components include:

  • CardReader: Used for reading ATM cards.
  • CashDispenser: Used for dispensing cash.
  • Keypad: Used for getting input from users.
  • Screen: Used for displaying information to users.
  • Printer: Used for printing receipts.

These components are essential for the ATM to perform its functions effectively. So, the ATM class does have objects for the card reader, cash dispenser, keypad, screen, and printer as part of its design.

Happy Learning :slight_smile: