Question: Write a program (C++) that determines which division had the highest sales for a quarter. The four divisions are: Northeast, Southeast, Northwest and Southwest. You

Write a program (C++) that determines which division had the highest sales for a quarter. The four divisions are: Northeast, Southeast, Northwest and Southwest.

  1. You will have the following functions, getSales, findHighest, printResult, each of which will be called by main.
  2. The getSales function, you will input the sales for each division into an array called quartersales. You will use the index of the array to determine which division is the highest selling division. Northeast 0, Southeast 1, Northwest 2, Southwest 3.
  3. In the getSales function, valid the sales amount to make sure it is a positive amount. If a negative amount is entered, make the user enter the sales amount again.
  4. In the findHighest function, determine which division had the highest sales.
  5. In the printResult function, display the division name and the sales amount. The sales amount should always be printed with 2 decimal places.
  6. Submit your program to blackboard as usual. Always include the following lines of comments in your program as well as other internal documentation.
  7. When writing your programs, inputs should always have prompts so the user understands what needs to be input and output should always have descriptions as well.

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 Databases Questions!