Answered step by step
Verified Expert Solution
Question
1 Approved Answer
must use this name. If you want to append your name to it , that is fine. For this program assume you opened up a
must use this name. If you want to append your name to it that is fine. For this program assume you opened up a package delivery service to supplement the package deliveries done by the USPS Unite States Postal Service You do this work under contract with the USPS. This program collects information on the deliveries your company, Webster Delivery Service WDS makes and determines some related statistics such as the total number of packages delivered, the average number of packages delivered, the days on which the minimum and the maximum packages were delivered and the number of those packages delivered.
In this program you are trying to calculate statistics related to WDS previously mentioned for the days of a week.
Please use the following variables in the main function.
const int SIZE ;
int deliveriesSIZE;
int ptr deliveries;
Use a loop to access the array. You are required to use the pointer ptr as pointer syntax to manipulate the array not deliveriesi
You are also required to use at least different ways of pointer manipulations to the array.
Your program should ask the user to enter all data, calculate and display the total, the average, the smallest number of deliveries and the largest number of deliveries. Display all values with the same format as sample output.
Other Specifications:
Use fixed setprecision to display two decimal values for the average
The number of deliveries should be between and inclusive both and are acceptable since that is what the contract with the USPS allows.
Follow program style guidelines very carefully.
a Points will be taken off for all violations, especially the following these pertain to all future programs as well:
i Missing the comment block in every program file.
ii Not checking for a valid file open when files are utilized.
iii. When functions are used, not placing function definitions after the main function, and then using function prototypes to declare the functions.
b Listed below are some common mistakes, please verify.
i There should be no global constant variables at all.
ii Store all values as variables, do not hardcode any values, use named constants instead. For example
const int MIN;
const int MAx;
iii. Use a line separator to separate blocks of programs. stars line separator comes with a blank line before and after.
Use it between each function definition.
Separate function prototypes and main function definitions
Between "using namespace std; and function prototypesmain
All assignments must be submitted and run as specified to pass the course see syllabus
Your output format must match with my output format, including the blank lines.
Submit your assignment cpp only via Canvas before the due date.
See an example of the output below.
Please enter the number of deliveries on each day
Day :
Invalid value, please reenter:
Invalid value, please reenter:
Please enter the number of deliveries on each day
Day :
Please enter the number of deliveries on each day
Day :
Please enter the number of deliveries on each day
Day :
Please enter the number of deliveries on each day
Day :
Please enter the number of deliveries on each day
Day :
Please enter the number of deliveries on each day
Day :
The numbers of packages delivered were:
The total number of packages delivered was deliveries
The average daily number of packages was deliveries
The minimum delivery was on day and was deliveries
The maximum delivery was on day and was deliveries
C: Users carolDesktopStans Stuff COSCOAProgramming II Spring Jrogram Assignments Program Assignment
ProgramAssignment Debug Assignment exe process exited with code
Press any key to close this window
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started