A local retail shop-owner has been inspired to have a robot that mimics the process of selling products in his shop. The products are placed on the shelves by the wall. Basically, when a customer requests for a product, the owner checks if such product is available in-stock. If it is, he walks over to collect it and tells the price. He then receives money from the customer, then walks over to the till, where he punches in the amount to be paid. The till then computes the change if any and opens the tray. The owner then gives change to the customer.
Following the 5 steps in designing a Finite State Machine, design a robot with the necessary functionalities, and then code it in C++. You may include as much functionality as you see fit.