Homework 2: Pointers, Pointers Everywhere, but will they all link?

Short Description:

Write a program that implements a simple order tracking system for a small company.

Goals

When you finish this homework, you should have:

Formal Description

Your task is to write a simple order tracking system for a small company. To simplify the implementation you need only track the following fields for each order You should assume that there is a vary large set of associated data, such as items ordered, quantity, and special instructions. This data has been removed to simplify the program. You should only allocate memory for each order once and you should not copy the data from one location to another.. To accomplish this this, you will most likely need a node with three link fields.

Your system should begin by prompting the user for a file name. It should read and process the commands in this file.

Note, you may assume that the file name, along with all other commands are in the correct format. The user may attempt to perform an illegal operation, but the command to do that will be correctly formatted.

As your program processes each command, please print Processing command "command". Follow this with a new line character. Please see the example below. This is strictly for debugging purposes and should be easy to turn off.

Commands:

The input file will contain zero or more of the following commands. All commands will be in correct format

Output Formatting Instructions

When printing a single record print as follows

The above record would appear as follows, the ↩ indicates a newline.
        Customer Name:    George Washington↩
        Customer Number:  12345↩
        Order Number:     4321↩
        Order Status:     Ordered↩
↩ 
When printing a list of orders Printing Several records by Customer Name would appear as follows:
Orders sorted by Customer Name
↩
        Customer Name:    George Bush↩
        Customer Number:  12346↩
        Order Number:     4322↩
        Order Status:     Ordered↩
↩
        Customer Name:    George H. W. Bush↩
        Customer Number:  12344↩
        Order Number:     4323↩
        Order Status:     Ordered↩
↩
        Customer Name:    George Washington↩
        Customer Number:  12345↩
        Order Number:     4321↩
        Order Status:     Ordered↩
↩
In any case where no customer is present, either the list is empty or the record is missing, simply print a blank line.

A sample data file is here.

My output for the sample data file is here

Programming Requirements

There is a concerned that they may be a very large number of records, so they ask that you store each record only once and do not sort the records. This means that the records need to be stored in linked lists, ordered by each of the fields.

To do this you must build a list structure which simultaneously supports three lists. For the above data the data structure may be visualized as follows:

Note, there is only one node allocated per data item. This is a requirement of the project.

You should implement a MultiList class built in an implementation and header file. Your class should implement all methods necessary for a class containing dynamic memory.

If you wish to disable any of the member functions required for a class with dynamic memory, you must do so properly. You must not have memory leaks however.

Your data structure should support

You may only use the following library containers:

You may not use the list, vector, or any other mass container class. The idea is for you to implement and master linked lists.

You should provide a UML document describing all classes implemented.

Your code MUST compile with the following compiler flags on cslab103

CXXFLAGS = -g -O3 -Wpedantic -Wall -Wextra -Wmisleading-indentation -Wunused -Wuninitialized -Wshadow -Wconversion -Wfloat-equal -Wparentheses -Wunreachable-code -std=c++17 

Some Notes

I declared two enumerated types, one for the order status and one for the different fields I would build a list over.

I employed multiple arrays of shared_ptr to represent

I made use of templates for functions such as Find.

Required Files

A single tar or zip file containing the source code, documentation, and makefile for this program. This file should not contain object files or executables.

Submission

Upload your tar or zip file by the due date to the D2L folder Homework 2.