Write a program that uses a structure named CorpData to store the following information on a company division.
Division Name(North, South, East, Or West)
First quarter sales
Second quarter sales
Third quarter sales
Fourth quarter sales
Total annual sales
Average quarter sales
Include a constructor that allows the division name and four quarterly sales amounts to be specified at the time a CorpData variable is created.
The program should create four variables of this structure, each representing one of the following corporate divisions: North, South, East and West. Each variable should be passed in turn to a function that calculates and stores the total annual sales and average sales for that division.
Once this has been done for each division, each variable should be passed in turn to a function that displays the division name, total sales, and average sales.
Anybody know how I can fix the errors? Please let me know!!
Thanks!
Your getData() function should not be for a specific division. Re-write it, but without north. or west. or anything like that, and no mentions of divisions. In main(), have it create four objects: CorpData north, south, east and west. From there, call getData() for each structure.