The vending machine delivers an ice cream bar after it hasreceived 15 cents in coins. The machine has a single coin slot thataccepts only nickels and dimes, one coin at a time. A mechanicalsensor indicates whether a dime or a nickel has been inserted intothe coin slot. The controllerA????1s output causes one candy bar to bereleased down a chute to the charitable donor. The donor may insertthree nickels, a dime and a nickel, or two nickels and a dime ortwo dimes. If the donor inserts a total of 20 cents, the machinekeeps the extra 5 cents as an additional charitable donation. Note:use Moore machine for your implementation. Here ismy State Diagram for the first part.
Now I need help with the state diagram and state table for thesecond Part.
It was deemed impractical to keep the extra nickel of change forthe Dime-Dime-Nickel and Nickel-Nickel-Dime scenario listed above.Too many users were annoyed that the extra nickel was kept as anextra donation. Therefore, a second output called Change is toreturn one Nickel in the above two scenarios. Add a state calledTwentyCents that dispenses the candy bar and returns anickels change.