How to approach 'Vending machine that return change' interview question?

Status
Not open for further replies.

morris_mano

Full Member level 2
Joined
Apr 9, 2012
Messages
137
Helped
39
Reputation
78
Reaction score
41
Trophy points
1,308
Location
US
Activity points
2,770
I was asked in an interview, how would you design a vending machine that accepts nickel, dime and quarter, and output a product after the total coin value reaches 40 cent and also return a change if total coin value exceeds 40cent. The change can be in any combination of nickel, dime and quarter.

I designed this vending machine later and tested it. It works. Basically it had 3 submodule: coin_adder, vending_fsm and coin_change.

If you were asked the same question, what would be your approach to answer it. Will you show block diagram of different sub blocks first and draw state graph for each sub-blocks and explain the procedural blocks inside, or..?

It will help other people and myself in how to give the best answer, if asked in interview.

Thanks,
 

how many cents do each nickel,dime and quater equal to?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…