Question
Instructions C++ program The Dayton Fire & Brimstone company has asked you to write a program which will produce a report, in chart form, showing
Instructions C++ program
The Dayton Fire & Brimstone company has asked you to write a program which will produce a report, in chart form, showing how their four divisions are doing this year in generating sales. Each division has five sales territories.
The four divisions are East Coast, Mid-West, Far-West, and West Coast.
In main:
-declare a two-dimensional array of doubles which represents the four divisions as rows and the five columns as territories. Also define a vector to hold the division names and another array of doubles to hold each of the four division's sales total.
-call a function which repeatedly has the user enter a division name and place it in the vector, and then enters the divisions five sales amounts and places them into the two-dimensional array, using the division name as a prompt. Validate that each sales amount is zero or greater.
-call a second function which processes the two-dimensional array by summing the sales of each division and placing the total into the array of divisional sales totals.
-in main: process the divisional totals array and vector by producing the following sales chart:
-display a Sales Chart title line
-display a single line for each division, showing:
>the divisions name
>the divisions total sales amount
>an asterisk (*) for each $1,000 in sales, e.g., $3, 500 in sales would show: * * *
-also determine the division with the most sales
After the sales chart is displayed, display the division name and sales amount of the division with the most sales.
arrays must be processed with loops, and any vector statements or functions must be from Chapter 7 of Starting out with C++ From Control Structures through Objects textbook.
Use this data for the screen print:
East Coast: $800, $1,200, $2,000, $500, $2,500
Mid-West: $1,000, $3,000, $2,500, $5,000, $1,500
Far-West: $50, $150, $400, $200, $199
West Coast: $200, $0, $500, $100, $201
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