This document describes a pizza ordering simulation program that uses various data structures. A Food class and Queue class are created, with the Queue using a linked list for implementation. Customer orders are stored in structs as part of the Food class and in a dynamic array. The program allows customers to select from arrays of pizzas and sides, adding each selection to a queue. Once selections are complete, the queue data is transferred to a dynamic array. Elements in the array are then searched and sorted by cooking time to prioritize quicker items.
2. Class Food created.
Queue template class created.
Queue data structure used.
Data stored in STRUCs as part of the Food class
Linked list class used to implement the Queue class
Dynamic array used for manipulate the customer
orders.
Performing Searching and sorting.
Counting time to finish cooking (in progress)
3. The user has been show a list of Pizzas to choose from.
(Pizzas stored in an array)
After each selection the user is asked do they want to
continue choosing from pizza section?
If “Yes” the selection continues until customer decides
to stop (select “No”).
After that second array is visualized to show
Sides(appetizers) to choose from.
4. While the customer choosing an items every single one
is send to a Queue that stores it.
When the whole selection process is done a Dynamic
array is created the data from the Queue is send to it.
Once the dynamic array is filled with data a searched is
performed to determine the element with lowest “time
to cook” a swap is done immediately after that so the
object with lowest cooking time is placed on first
position.
5. Finally selection sort is performed to present all the
ordered items in ascending order sorted by cooking
time.