Placeholder

CISS 350 Programming Assignment 1 Checkout System

$15.00

Description

Programming Assignment 1
You will write, run, and test a C++ program to simulate the operation of a grocery store checkout system. Your program should first build a data structure to contain information on all the products available in the store. Then the program should print the cash register receipt for each customer.
Input
The input for this program has two sources: the inventory information is input from a text file, and the customer transactions are input from the keyboard.
The information about each product carried by the store is listed on a single line in the inventory file “Invent.dat”, in the following format:
(product number) (description) (price) (tax)
where
is a five-digit positive (nonzero) integer,
is a string of at most 12 characters with no embedded blanks,
is a real number, and
is a character (‘T’ if the product is taxable; ‘N’ if it is not taxable). The data in the inventory file is ordered from smallest to largest product number.
The customer transactions are input from the keyboard, in the following format:
(product number) (times)
where (product number) is as described above, and (times) is an integer in the range 1 to 100, indicating the quantity of this product desired. A zero input for (product number) indicates the end of the customer’s order. (The store will soon be using a scanner to input the product number, but for now it is typed in by the cashier.)
Output
The program outputs should be written to a text file called “Receipts.out.”
The inventory information is echo printed to the output file.
The cash register receipt for each customer is written to the output file. The receipts should be nicely formatted, with the product description (not the product number), number of items, item price, and total price for each product printed on a single line. At the end of each customer’s order, the subtotal for all items, amount of tax on taxable items, and total bill should be printed, clearly labeled. (The tax rate is 7.5% for taxable items.)
Processing
The program first reads in all of the inventory information from file “Invent.in.” echo printing the information to the output file.
The program then prompts the cashier to begin inputting the order for the first customer.
This customer’s order is processed, and the receipt is printed to the output file.
After each customer’s order is processed, the program should ask the cashier if another customer is to be processed. If the answer is ‘Y’, the program sets up to process the next customer; if the answer is ‘N’, the program terminates with a friendly message.
Error Checking
The following input errors are possible and should be handled by an exception class:
Duplicate
in inventory file. Write an error message to the output file and skip the second entry.
not in inventory file. Write an error message on the receipt, ignore that product number, and continue with the next item.
not in the specified range. Write an error message to the output file, ignore that line, and continue with the next item.
Example
From File “Invent.in”:
11012 gallon-milk 1.99 N
11014 butter 2.59 N
11110 pie-shells 0.99 N
20115 laundry-soap 3.60 T
30005 homestyle-br 0.99 N
From keyboard (one customer):
11110 2
40012 3
20115 1
0
To “Receipts.out” file:
——————————————————
SEP 10, 1998 6:00 pm (* date and time optional *)
Customer 1
pie-shells 2 @ 0.99 1.98
*** item 40012 not in inventory ***
laundry-soap 1 @ 3.60 3.60 TX
Subtotal 5.58
Tax 0.27
Total 5.85
Data Structures
The inventory information can be stored in an array of product records. Assume that the maximum number of products is 50, for purposes of writing this program. You should specify this data structure as an ADT, as described in the chapter; define and implement a set of operations to encapsulate it. The ADT should be tested using a test driver.
Deliverables
Your design (either object-oriented or top-down)
A listing of the ADT
A listing of the test driver for the ADT
A listing of the test plan as input for the driver
A listing of the output from the test driver
A listing of your program
A listing of your test plan as input to the program
A listing of the output file
SCREENSHOTS
SOLUTION
PAYMENT
ENTIRE COURSE
The solution includes a Visual Studio (c++) project
Attachments [Move over files to preview content of those files]
CISS_350_Programming_Assignment_1.zip (4.43 MB)
CISS350-Programming-Assignment-1-Output.png
CISS350-Programming-Assignment-1-Screenshot.png
Visual Studio C++ Project
CISS350Assignment1
CISS350Assignment1
CheckoutSystem.cpp
CISS350Assignment1.vcxproj
CISS350Assignment1.vcxproj.filters
Debug
CheckoutSystem.obj
CISS350A.63B21483.tlog
CISS350Assignment1.lastbuildstate
CISS350Assignment1.obj
CISS350Assignment1.pch
stdafx.obj
vc120.idb
vc120.pdb
Invent.in
ReadMe.txt
Receipts.out
stdafx.cpp
stdafx.h
targetver.h
CISS350Assignment1.opensdf
CISS350Assignment1.sdf
CISS350Assignment1.sln
CISS350Assignment1.v12.suo
Debug
CISS350Assignment1.exe
CISS350Assignment1.ilk
CISS350Assignment1.pdb
ipch
ciss350assignment1-f6838626
ciss350assignment1-85d29c0.ipch
Preview CheckoutSystem.cpp
#xxxxxx xxxxxxxxx “xxxxxx.xx”
#xxxxxx xxxxxxxxxx “xxxxxxxx.xxx”
xxxxx xxxxxxxxx xxx;
xxxxxxx xxxxxx {
int productId; string description; double price; char tax; int quantity; } Item;
list
items; list
sold;
Item createItem(int productId, string description, double price, char tax) { Item i;
x.xxxxxxxxx = xxxxxxxxx;
x.xxxxxxxxxxx = xxxxxxxxxxx;
x.xxxxx = xxxxx;
x.xxx = xxx;
xxxxxx x;
}
Preview ReadMe.txt
========================================================================
xxxxxxx xxxxxxxxxxx : xxxx350xxxxxxxxxx1 xxxxxxx xxxxxxxx
========================================================================
xxxxxxxxx xxx xxxxxxx xxxx xxxx350xxxxxxxxxx1 xxxxxxxxxxx xxx xxx.
This file contains a summary of what you will find in each of the files that make up your CISS350Assignment1 application.
CISS350Assignment1.vcxproj This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and
xxxxxxxxxxx xxxxx xxx xxxxxxxxx, xxxxxxxxxxxxxx, xxx xxxxxxx xxxxxxxx xxxxxxxx xxxx xxx
xxxxxxxxxxx xxxxxx.
xxxx350xxxxxxxxxx1.xxxxxxx.xxxxxxx
xxxx xx xxx xxxxxxx xxxx xxx xx++ xxxxxxxx xxxxxxxxx xxxxx xx xxxxxxxxxxx xxxxxx.
xx xxxxxxxx xxxxxxxxxxx xxxxx xxx xxxxxxxxxxx xxxxxxx xxx xxxxx xx xxxx xxxxxxx
Preview stdafx.h
// xxxxxx.x : xxxxxxx xxxx xxx xxxxxxxx xxxxxx xxxxxxx xxxxx,
// xx xxxxxxx xxxxxxxx xxxxxxx xxxxx xxxx xxx xxxx xxxxxxxxxx, xxx
// xxx xxxxxxx xxxxxxxxxxxx
//
#pragma once
#include “targetver.h”
#include
#include
// xxxx: xxxxxxxxx xxxxxxxxxx xxxxxxx xxxx xxxxxxx xxxxxxxx xxxx
Preview targetver.h
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
// xxx xxx _xxx32_xxxxx xxxxx xx xxx xxxxxxxx xxx xxxx xx xxxxxxx xxxxxx xxxxxxxxx xxxxxxxxx.x.
#xxxxxxx
Price: $15
Buy Now
Checkout
Added to cart
Buy More Save More
Buy at least TWO items & save up to 30% OFF your ENTIRE order!
Rack up instant rebates in your shopping cart. Simply add items to your cart, and see the savings add up.
Discounts will automatically be applied on eligible orders.
CISS 350 Programming Assignment 1 Checkout System – $15.00
CISS 350 Programming Assignment 2 Computer Dating Service – $15.00
CISS 350 Programming Assignment 3 Local Medical Clinic – $15.00
CISS 350 Programming Assignment 4 Circular Linked List – $15.00
CISS 350 Programming Assignment 5 Towers of Hanoi – $15.00
CISS 350 Programming Assignment 6 Police Department – $19.00
CISS 350 Programming Assignment 7 Compare Two Implementations of a Priority Queue – $19.00
Add to Cart
Checkout
Added to cart
FLASH SALE
$89
$113
Save $24
CISS350 Entire Course
Get Entire Course
You May Also Like:
CISS 350 Entire Course
CISS 350 Programming Assignment 2 Computer Dating Service
CISS 350 Programming Assignment 3 Local Medical Clinic
CISS 350 Programming Assignment 4 Circular Linked List
CISS 350 Programming Assignment 5 Towers of Hanoi
CISS 350 Programming Assignment 6 Police Department
CISS 350 Programming Assignment 7 Compare Two Implementations of a Priority Queue

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.