Question: Plan the project. In addition to the main function, each program should have at least one other function. The function must have at least one

Plan the project. In addition to the main function, each program should have at least one other
function. The function must have at least one parameter and should return a value.
Go the class team on replit and write and test your code in the designated project folder.
When your project is ready to be graded write a project report with the following format:
Name of program (include challenge number or title or both)
Your name
Name of your partner (if you have one)
A structure chart showing the functional decomposition of your program (may be hand drawn
neatly and scanned into the report)
An IPO chart for each user-defined function
In your code add comments at the beginning of the script that summarizes the inputs, process,
and outputs for the program.
For user-defined functions add comments to the function prototypes that describe the
preconditions and post condition for the function.
Answer the following questions:
1. What did you find most challenging with this program?
2. What problems did you encounter and how did you solve them?
3. What did you learn from writing this program?
Your final project must be in .pdf format. Upload your project report(s) to the assignment in Canvas and
submit.
Gas Prices
This project consists of a series of programs to analyze gas prices between April 1993 and August 2013.
You will be provided with a text file named GasPrices.txt. The file contains the weekly average prices for
a gallon of gas in the United States, beginning on April 5th,1993, and ending on August 26th,2013.
Figure 8-8 shows an example of the first few lines of the files contents:
Figure 8-8 The GasPrices.txt file
Each line in the file contains the average price for a gallon of gas on a specific date. Each line is
formatted in the following way:
MM-DD-YYYY:Price
MM is the two-digit month, DD is the two-digit day, and YYYY is the four-digit year. Price is the average
price per gallon of gas on the specified date.
To get full credit for this project, you must complete programs 1,2 and 3. You will get extra credit for
completing programs 4, and 5(you will get credit for each extra program you complete).
1. Average Price Per Year: Calculate the average price of gas per year, for each year in the file.
(The files data starts in April of 1993, and it ends in August 2013. Use the data that is present
for the years 1993 and 2013). Produce a report showing each year and the average gas price for
that year.
2. Highest and Lowest Prices Per Year: For each year in the file, determine the date and amount
for the lowest price, and the highest price. Produce a report showing for each year, the lowest
price and date on which it occurred and the highest price and the date on which it occurred
(show one year per line).
3. Average Price Per Month: Calculate the average price for each month in the file. Produce a
report that shows each month and year and the average price for that month and year.
4. List of Prices, Lowest to Highest: Generate a text file that lists the dates and prices, sorted from
the lowest price to the highest.
5. List of Prices, Highest to lowest: Generate a text file that lists the dates and prices, sorted from
the highest price to the lowest.04-05-1993:1.068
04-12-1993:1.079
04-19-1993:1.079
04-26-1993:1.086
05-03-1993:1.086
05-10-1993:1.097
05-17-1993:1.106
05-24-1993:1.106
05-31-1993:1.107
06-07-1993:1.104
06-14-1993:1.101
06-21-1993:1.095
06-28-1993:1.089
07-05-1993:1.086
07-12-1993:1.081
07-19-1993:1.075
07-26-1993:1.069
08-02-1993:1.062
08-09-1993:1.06
08-16-1993:1.059
08-23-1993:1.065
08-30-1993:1.062
09-06-1993:1.055
09-13-1993:1.051
09-20-1993:1.045
09-27-1993:1.047
10-04-1993:1.092
10-11-1993:1.09
10-18-1993:1.093
10-25-1993:1.092
11-01-1993:1.084
11-08-1993:1.075
11-15-1993:1.064
11-22-1993:1.058
11-29-1993:1.051
12-06-1993:1.036
12-13-1993:1.018
12-20-1993:1.003
12-27-1993:0.999
01-03-1994:0.992
01-10-1994:0.995
01-17-1994:1.001
01-24-1994:0.999
01-31-1994:1.005
02-07-1994:1.007
02-14-1994:1.016
02-21-1994:1.009
02-28-1994:1.004
03-07-1994:1.007
03-14-1994:1.005
03-21-1994:1.007
03-28-1994:1.012
04-04-1994:1.011
04-11-1994:1.028

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!