Question: i need help with this assignment Instructions: Submit to Blackboard one C++file: salesAnalysis_FirstNameLastName.cpp. The code in the file must include your name, the course, the

i need help with this assignment
i need help with this assignment Instructions: Submit to Blackboard one C++file:
salesAnalysis_FirstNameLastName.cpp. The code in the file must include your name, the course,
the file name (the full path name) and the program description in
comments. Example // File Name: C:|temp inheritance_Lucinda_Jackson.cpp // Author: Lucinda A. Jackson

Instructions: Submit to Blackboard one C++file: salesAnalysis_FirstNameLastName.cpp. The code in the file must include your name, the course, the file name (the full path name) and the program description in comments. Example // File Name: C:|temp inheritance_Lucinda_Jackson.cpp // Author: Lucinda A. Jackson // Course: CSC-260L-01 // Program Description:... Step 1: Download two data files: The sales persons' ID file and the company's sales data file. (5 pts) Step 2: we will define a struct with sales data: (20 pts) 1. ID (string) // sales persons ID number. 2. saleByQuarter[4] (double) // array of sale amount for each quarter 3. totalSale (double) // the total amount for the year **** Use salesPersonRec as the struct name. Step 3: ( 20 pts) 1. Write a function getID(). The getiD() is a void function with 2 parameters(an array of salespersonRec and its size). This function will: a. declare an ifstream variable: infile b. open the sale persons' ID file and check for opening error c. read the file and store the IDs into the salesPersonRec[i].ID. To simplify the program, we assume that we know there are only 6 sale persons in the company. You can define a const int NO_OF_SALES_PERSON =6 after "using namespace std" statement. d. Initialize all other field to 0.0 e. Close the file f. "*. for debugging, you can print all ID's out. But remember to delete the code after you get it done correctly. 8. In the main() function, i. Declare an array of salespersonRec (data type) of size NO_OF_SALES_PERSON ii. Call getiD() function by passing the array and its size to it 1. Write a function getData(). The getData() is a void function with 2 parameters(an array of 1. ( 20 pts) salesPersonRec and its size). This function will: a. declare an ifstream variable: inFile b. open the sales data file \& check for opening error c. read the ID and store it into firstNomeID while (inFile) \{ -read in month and amount -search the array for firstNameID. Break if found the ID -check the month and determine which quarter to add the amount. You can use either if statement or switch statement for this part. -add the amount to the calculated quarter End-of-while-loop d. close the file e. *** for debugging, you can print all data out. But remember to delete the code after you get it done correctly. f. In the main() function, call getData() function by passing the array and its size to it. Step 5: (10 pts) 1. Write a function saleByQuarter(). The saleByQuarter () is a void function with 3 parameters(an array of salesPersonRec, its size, and an array of double totalSalesByQuarter[4]). We don't need to pass the size of the 3rd array. Its will be always equal to 4 . This function will: a. Add the total amount of a specific quarter of all sale persons and store the final result into the correspondent spot in the totalSalesByQuarter[] array b. In the main() function, -Call saleByQuarter () function by passing the array, its size and the totalSalesByQuarter[] array This function is provided for you as the follows: Step 6: (5 pts) 1. Write a function printReport(). The printReport() is a void function with 2 parameters(an array of salesPersonRec and its size). This function will: a. Print a title: "Annual Sales Report " b. Print sale person's ID, the amount for each quarter, and total for the sale person with header. Each sale person's data is printed in one row c. Print the total of each quarter from all sale persons This function is provided for you as the follows: void printheport (salespersonhec list[], int listsize, int index; int quartery cout e *........... Annual Soles Repert for (index = oj index e listslzej indext+) f cout \& 1 ist [index ]. 10

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!