#45 ATM Implementation

Companies:
Yandex
Themes:
JavaOOPPractice

Write an ATM class:

/*
ATM.
Initialized with a set of banknotes and can dispense banknotes for a requested amount,
or return a rejection.
Dispensed banknotes are deducted from the ATM balance.
Allowed denominations: ₽50, ₽100, ₽500, ₽1000, ₽5000.
Other currencies and denominations should be easy for developers to add in the future.
Multithreaded scenarios may be added later, such as reservation.
*/

public class ATM {
    ...
}

Question review

Mentor
Answer as you would in a real interview. I’ll ask follow-up questions, then compare your answer with the reference answer and show your accuracy as a %.
Sign in to start the dialogue The mentor keeps the context of the current question and your previous messages.
Sign in