Project 1

Problem Description:

The Colorado Health Protection Corporation (CHPC) sells personal protective gear to hospitals and medical practices (Physicians, Dentists, etc.) in Colorado, Wyoming, and Utah. CHPC needs a sales report of the sales for each day, and your job is to write program that will take sales data from the user, aggregate it, and produce a report. The report should begin by asking the user to input the state, sale date, and sales tax rate for the given state- this data should then be displayed back to the user only once- this is the report "header". Then the report will display an output line for each sale showing the transaction ID, the pre-tax subtotal, and the after-tax transaction amount paid by the customer. After all sales records are entered and displayed, the user should enter -1 to indicate they are done entering sales information, and then a report summary should display the total subtotal amount, the total post-tax transaction amount and the average post-tax transaction amount. The summary must also identify the "sale with the highest post-tax transaction amount" by displaying the highest post-tax transaction amount and associated transaction ID. In the event of multiple instances of the largest post-tax sale amount only the first instance should be reported. Note that the pre-tax subtotal amount is the listed price- similar to a MSRP- Manufacturer's Suggested Retail Price. The post-tax sale amount is the actual amount of the sale after taxes have been applied- (see the formulas below). The sales tax rate will vary by state, so it is an input field.

The state sales tax rate should be INPUT as a decimal. So- if sales tax is 11%, the user should input 0.11

All monetary inputs should be displayed with two decimal positions and should be expressed in dollars and cents (using the $ sign when appropriate).*

All monetary outputs should be displayed with the decimal positions and should be expressed in dollars and cents (using the $ sign when appropriate).*

Just to be clear- the sales data for each state is entered as a batch process at the end of the day. Users of the program at CHPC will enter the data which consists of the state, sale date and sales tax rate (these three fields are input once) followed by each transaction record containing the transaction ID and pre-tax subtotal amount. Users will enter -1 as the sale ID when they want to exit the program and prompt the output of the final report (which consists of the total subtotal amount, the total post-tax transaction amount, the average transaction amount, the highest post-tax sale amount and the associated sale ID.

The average post-tax transaction amount is determined by dividing the total post-tax transaction amount by the number of transactions that day.

*Formatting considerations such as using dollar signs ($), percentage signs (%), and decimal places only need to be considered when you are actually programming- you do not need to consider these requirements when writing the human-level or program-level walk-throughs, the hierarchy chart, the flow-chart, or the pseudocode.

At this time, the program only needs to deal with a single state- but you need to let the user specify which state they want to input the data for. Each store has a $15,000 sale subtotal limit for any one sale. If a sale has a sale subtotal amount of more than $15,000, the program should prompt the user for a sale subtotal amount less than $15,000.

A subset of data for a typical day is given for you to test your models.

CIS 2110 Project #1 Test Data

CHPC Daily Transactions
State: Colorado
Date: March 17, 2021
State tax rate: 4.5%
Transaction ID Sale subtotal
C101 1243.56
C202 4321.10
C303 6789.78
C404 1111.11
C505 7654
-1

Project 2

Develop a Python program to implement the solution of the problem described in Project 1. In addition to the requirements described in Project #1, your Python program should also:

  • include a comment at the beginning of the source code that indicates your name as the author and the date it was written.
  • have the first output to the screen be an appropriate assignment title and your name.
  • have a minimum of three methods.
  • PRIORITY SHOULD BE GIVEN to giving me Python code that ACTUALLY RUNS. Get the most basic code you can to run, then stub in outputs to tell me the rest of what you wanted to do.

Example Execution:

  • Below is an "example of the program execution".
  • Your solution does not have to be so nicely formatted.
  • Your solution should input each record and output it immediately, then output the summary at the end.
=================================
Solution for Project #2
CHPC Daily Transaction Report
by Joe Hasley
=================================
Enter the state: Colorado
Enter the date: March 17, 2021
Enter the tax rate as a decimal: .045

Please enter the SaleID: C111
Enter the pre-tax sale amount: 1243.65

Sale Summary:
============================
SaleID: C111
Pre-tax sale amount: 1243.65
Trans Amount: 1311.11
============================

Please enter the Transaction Number: C222
Enter the Retail Amount: 4312.10

Transaction Summary:
============================
Transaction Number: C222
Retail Amt: 4312.10
Trans Amount: 4516.44
============================

AND SO ON UNTIL THE END...............

Please enter the Transaction Number: -1

==========================================
======= CHPC: End of Day Report ========
State: Colorado
Date: March17, 2021
Tax Rate: 0.045
==========================================
Total preTax Sales: 21040.82
Total postTax Sales: 21987.66
Average postTax Sale: 4397.53
Low Trans Amount: 1243.65
Low Trans Number: C111
==========================================
==========================================
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.