This code is based on the working of supermarket devices which would keep record as well as deduct the products when bought