Help on Homework due 6/28/12 (beginners class should be simple for you all )

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
Homework due 6/28/12

A bit late to start with that work, isn't it? -.-*
Yeah, probably you didn't mind finding a solution, I don't even see a program skeleton. Not helping.
C++ isn't my thing
Then you should gladly fail...
I know we seem a bit harsh, but there is an unwritten rule that we've followed pretty well over the years, and that rule boils down to "do not solve homework problems". So, sorry.

What you're asking is for us to solve a homework problem for you, which goes against that rule. If there was a specific part you needed help with, then we'd be a lot more inclined to help. :)

Oh, and as shadow123 said... that's a bit of late start, isn't it?

-Albatross
Not to mention almost any problem a college/university can give you will have a solution somewhere online if you just google for it long enough.
Then you should gladly fail...

Bare in mind that a lot of colleges and universities make you take C++ and other programming languages as part of their curriculum even if the degree isn't directly connected to programming.
Last edited on by closed account z6A9GNh0
well the thing is it is a condensed coarse so she assigns homework the day before it is due and Thanks Albatross for giving me a straight answer well the main part that is giving me issues is making the array have the sum and the different class names correctly but i understand if you wont help because it is homework i think i can miss one lab and to be honest i only needed this class for the simple if else, for, and while loops for robotics class and my friends tell me that i barely use C++ for it
Topic archived. No new replies allowed.