Quick Look

You will use your search tree ADT,and possibly some of the other ADTs created over the semester to create a rudimentary point of sale system that maintains inventory state. The system will allow a customer to add items to their order, removing items from the overall inventory and print reports.

Learning Outcomes

When you have finished doing this assignment you should be able to:

  • Use a binary search tree.
  • Design and implement an effective, usable text-based user interface .
  • Design and implement a software program that protects itself from user errors.

Required Prior Knowledge

Before you attempt this assignment please ensure that you have a good understanding of the concepts listed below. Consult the review section or reference section of the course if you need a refresher on any of these concepts.

  • Search Trees

Assignment Description

Write a program that acts as a point of sale system (POS) for a small game store. The POS system is used to manage the store inventory and to generate invoices for customers. The user searchers for the item that the customer is purchasing and the number of items purchased is added to the customers invoice, and the inventory is updated to reflect the sale. A customer can purchase multiples of an item and may purchase more than one type of item in a single transaction. When all the items have been added to the customers invoice the invoice is printed to screen and remains there until the user indicates that the system should begin a new sale.

Your POS system may be a command line/text interface or you can use ncurses to make the interface. Regardless of the choice of interface, your system should be usable and should not crash if the user provides unexpected or incorrect input. You dont have to guard against control-characters, but other types of incorrect input should not crash the system.

You must use your search tree ADT in the searching component of this assignment, but you may need to use other structures as well. You may also use any of the previous ADTs that you have developed for this course for other portions of the assignment.

Musts

The POS system must provide the following capabilities:

  • Initialize the POS system on startup with the required inventory list (given at the end of this file). You may use a hard coded start up file or any other means you wish to initialize.
  • Allow the user to search for item by product name. There will be no duplicate product name in the data.
  • Add an item to customer invoice using the product number to identify the item. Adjust the inventory as necessary. User may purchase multiples.
  • Remove a product from inventory (removes all items of this type from the inventory)
  • Print a report (to the screen) that gives the quantity of each item in inventory. The report should be printed alphabetically by product name with one item per line of the report.
  • Print a report (to screen) of the customers invoice. Show the taxable items in a separate list from the non-taxable items.

Additions

You may add any of the following additions to the POS system:

  • Read an additional inventory file while the system is running, adding the data from the file to the existing inventory. You choose the format of the data file.
  • Allow the user to search for item by genre and then add zero or more items from the search to the invoice. There will be duplicate genres in the data.
  • Allow customers to edit the current invoice, adding or removing items and changing quantities of items.
  • Store the current inventory persistently as a binary file. Add flags to the program startup command to permit starting from either the current state of the inventory or from the initial state.
  • Compile all of your ADTs into a library and link to the library when you compile your code rather than including the source code for your ADTs. Submit the compiled html doxygen documentation for the library inside the lib/ folder. Submit the compiled, linkable library with your assignment files. Submit the source code as well for the Tree ADT so that we can grade it.
  • You may propose other additions if you wish. Be sure to have written approval of your proposal before you start implementing.

Starting Inventory

The initial inventory of the POS system is given in the CSV file that accompanies this document. The data has been assembled from lists of popular games and several sites that randomly generate specific types of data. The data is fictitious for the most part.

The first row of the CSV file is the labels for the column and is not to be used as data. The taxable column in the data indicates whether an item is taxable or not. 1 is used to indicate that an item is taxable, 0 to indicate that it is not taxable.

Some of the items in the inventory belong to multiple genre categories. The different categories are separated with vertical pipes. For example, the game Assassins Creed belongs to four different genres. The genre entry for it in the CSV file looks like this:

Historical fiction|Stealth|Action|Adventure

Each time your program starts it should load this starting inventory with the quantities shown in this CSV. You do not have to persistently store changes to the inventory unless that is the addition you choose to implement.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.