Next

Once we select an item to go into the shopping cart, we have to add “Quantity” and “Extended Price” (unit price x quantity) fields. So there is a third table derived from Item whose records are called “Order Item”; these are the records that go into the shopping cart.

Importantly, the Order Item table has behavior: assigning to Quantity computes the Extended Price. This is one of several ways we keep arithmetic out of the wiring diagram. You will soon see that we keep iteration out of the wiring diagram also.

Back