Help on Homework

Ok so I have to make a program that is "recorded in a data file with one sales record per line the class identification numbers that range from 0001-9999. here is a sample of the data:
Class ID......BoxesSold
=======================
3013...........8
2045...........13
2045...........7
1600...........25
2045...........6
3013...........18
....

Create 2 1-D arrays one for the ID numbers and one to record the number of boxes sold Since the classes in the school is 40 the size of both arrays should be set to 40 the first time an ID number is read store it in the next free slot in the array of identification numbers and initialize the corresponding position in the array of boxes sold to the numbers sold on the sales slip Each subsequent time the same ID number is read add the number of boxes sold to the corresponding position in the array of boxes sold When there are no more sales slips scan the array of boxes sold for the largest value the ID number in the corresponding position in the array of ID numbers is the class that wins the program will prompt for a dada file name and read from that data file it should output a table format number of boxes sold by each class as well as a message indicating which class is a the winner here is an example output of the program
Final Results for Cookie Sale 2012
==================================
Class.....Number of Boxes Sold
3013..........340
2045..........1255
1600..........534
2438..........154
3030..........298
PLEASE NOTE THAT THE .... ARE SUPPOSE TO BE SPACES

The winning class is class 2045 with a sale of 1255 boxes of cookies
Congratulations!

the program should have at lease the following user defined functions Make sure to write a brief description above each user defined functions for program documentations
ReadData: (reads the sales info from the data file and performs the appropriate accumulation of number of cookie boxes sold)
FindWinner: (scans the total number of boxes sold by each class and finds the class that sold the most boxes)
DisplayResults: (prints the number of boxes sold by each class in table format and displays the winning class)
Linearsearch:(if an item is found in the array returns the subscript of the item in the array otherwise return -1)
"
if you all could help me with this that would be great please help C++ isn't my thing
Last edited on
Sorry, we don't do homeworks. Or maybe some forum member will do for a fee. Who knows.

In any case, I recommend that you read the C++ tutorial in this site or some other site and just start working. Too bad it is not your thing, but it looks like you have no choice. Get over your distaste and start working.
Topic archived. No new replies allowed.