Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

What are the three main purposes of a trial balance?

Answered: 1 week ago