Creating the Truck Module

The next module you will write is the Truck module, which will provide all of the functionality for managing the food truck. It will have methods for creating and delivering orders and for printing a list of pending orders. Figure 8.11 shows how the Truck module will work with the DataStore module.

Figure 8.11  Truck module interacting with DataStore module

Truck module interacting with DataStore module

When a Truck instance is created, it is given a DataStore object. A Truck has methods for working with coffee orders, but it should not need to worry about how to store and manage that information. Instead, the Truck just passes those duties to the ...

Get Front-End Web Development: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.