What happens when you press “Buy”?
Imagine a small online bookshop. Nino picks a book and presses Buy. To her it is one button. Behind it, the program does six jobs: show the page, check the order, count the price, take the payment, save the order and find it again later.
A program is a set of instructions written by people, called code. The six grey boxes are those six jobs. In this lesson we look at one question: how should these jobs be arranged?
Діаграма
Six grey boxes inside a dashed frame labelled “Behind the Buy button”: Show page, Check order, Count price, Take payment, Save order, Find order.