Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Account/Inventory problem (management of customer service and management of inve

ID: 3771819 • Letter: A

Question

Account/Inventory problem (management of customer service and management of inventory).

Customers will use a separate Web-based app that stores request details in specially formatted text files (see input definitions below). Your food service application must read these text files, manage active order activity in virtual “shopping carts”, and then update inventory and produce receipts (as output text files) when orders are complete. Also, your application must manage customer payment accounts and provide system support functions for inventory control and reporting. The following list represents the minimum set of functional requirements.

Addition of food items to shopping carts. (Inventory is temporarily updated.)

Removal of food items from shopping carts. (Temporary changes to inventory are cancelled.)

Creation of shopping cart reports. (Output text file with list of cart items for a specific customer.)

Processing of payment upon checkout. (Includes processing of coupons.)

Processing of order information in customer carts upon checkout. (Commit changes to inventory.)

Management of debit accounts for customers. (All payments must be made from these accounts.)

Addition of food item quantity to the inventory of the food service (i.e., re-stocking)

Creation of inventory control reports. (Report for entire inventory or for specific food items.)

General Requirements

+ customer account info (name, acount #, etc) preloaded into customer file

+costumer request files can be stored in separate or combined files

+simple user interface for inventory and reporting

Payment and Debit Accounts

+intital balance given to customer service account

+keep track of account balances

+refuse payments over that ammount

+customers may submit request to add money to account

+Cancel checkout if total amount greater than account balance

Food Items

+min of 20 types of food items

+pre-loaded text file with inventory (food, quantity, price)

+customers must request quantity for each food item request

+price changes may occur during shopping but don't affect price in cart

+adding or removing food to carts causes only temp changes to inventory data

Shopping carts

+ 1 shopping cart per customer

+ program can handle min. of 20 carts at one time

+may save carts and contents but only for 1 day

+checkout request files can contain coupones (max of 10)

+costumer cart report show all cart items (with quantity, prices, total)

+each cart deleted after checkout and payment

+customer may only remove 1 cart item at a time

Inventory and Control reporting

+restocking at inventory could occur at any time

+food stocking inputs (names,quantity, prices)

+restocking inventory added to current inventory levels

Implementation

+at least 1 use of inheritance using classes

+at least 1 use of polymorphism, and 1 use of composition

+intialize class data in class constructors

+use array class template

+pointer data types and string class

+at least 1 overload of operators (not stream input/output)

+at least 1 use of STL container with iterator and algorithms

+use of exception handling

+customer,account,cart, inventory data stored in random access binary files (dat)

e.g. Request Files

REQUEST01.TXT

ADD:Apple, 5

ADD:Cereal, 2

REMOVE:Apples, 2

ADD:Milk, 1

REQUEST02.TXT

CARTREPORT:20102245

CREDIT:20102245,50.00

ADD:Bread,3

CHECKOUT:20102245, [Cereal, -0.5][Bread, -0.75]

Request formats(text file content)

Adding a food item to cart = ADD: customer number, food_item, name quantity

Removing a food item from cart = REMOVE: customer_number, food item, name, quantity

Creation of cart reports = CARTREPORT: customer_number

Customer checkout = CHECKOUT: customer_number, coupon_list

Add money to debit account = CREDIT: customer_number, money_ammount

“coupon_list” is a list of food item money amount pairs. Each pair is enclosed in square brackets and values separated with a comma (e.g., [Apples,-1.00][Milk,-0.75])

“customer_number” is an 8-digit value (e.g., 23738495)

Inventory Control User Interface

The user interface for the inventory control must be implemented with a simple text-based console window. Use basic stream input and output (cin and cout) to prompt the user for input and display results.

User Output Definitions

Shopping Cart Reports

Customers may request to see the contents of their shopping cart at any time. Upon request, you must write the following information to a text file (.TXT). The file name must contain the customer account number (e.g., CARTREPORT23738495.TXT).

Customer account number

A list of food items with associated quantity and price values

Total cost of all items in this cart

Checkout Receipt

This is a report is almost identical to the cart report but it also includes a record of coupons applied.

Current date

Customer account number

A list of food items with associated quantity and price values

A list of coupons each represented by the associated food name and discount price

Total cost of all items in this cart at checkout

Inventory Controls Reports

There are only two types of inventory reports – one that shows all food items and one that shows only a selected item.

Current date

A list of food items with associated quantity and price values

OR

Current date

One food item with associated quantity and price value

Data Resource Files

You must design your own files to hold data that your application needs to run properly. However, you must use only one file for all customer data (including account data), one file for all cart data and one file for all inventory data. Each of these three data files must use random access with binary format.

Validation and Error Messages

You must use C++ exception handling (try-throw-catch) to check for the follow exceptions. Print an appropriate error message in the console window whenever these exceptions are detected.

Food request quantity not available in inventory

Insufficient quantity in cart for remove request

Insufficient funds in debit account at checkout

Explanation / Answer

here are the complete code with commenting to make you easy understand:

// carts.h//

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote