Q.1
The basic process in this example is:

Q.2
The structure of this program is...