This code is a preliminary result of answering the question "how to create a smart contract".
As part of my Master's Thesis work of 'Framework for Adoption of Blockchain Technology withing the Food Import-Export System of Qatar, I developed a methodology for creating smart contracts and this code is simple implementation of my methodology. This work is not complete is still under scrutiny.