Programming Fundamentals C++ Assignment 4
Date: 2nd May, 2014
Instructors: Ms. Hafsah Qaiser
An organization that your little cousin belongs to is selling low-fat cookies. If your cousin’s class sells more cookies than any other class, the teacher has promised to take the whole on a picnic. Of course, your cousin volunteered you to keep track of all the sales and determine the winner. Each class has an identification number. Each sales slip has the class identification number and the number of boxes sold. You decide to create two arrays: one to hold the identification numbers and one to record the number of boxes sold. The identification numbers range from 1 through 10. Here is sample of the date
.The first time an identification number is read, store it in the next free slot in the array of identification number and initiate the corresponding position in the array of boxes sold to the number sold on the sales slip. Each subsequent time an identification number is read, add the number of boxes sold to the corresponding position in the array of boxes sold. You may assume that each class sold at least one box of cookies. When there are no more sales slips, scan the array of boxes for the largest value. The identification number in the corresponding position in the array of the identification numbers is the class that wins. Write your program and run it on the input from user. Which class won and how many boxes of cookies did they sell?
- Populating the identification number array. [3 marks]
- Populating the boxes array. [4 marks]
- Finding the maximum [3 marks]
- Deadline to submit the assignment is 8th May till midnight.
- No late submission will be accepted.
- Email the assignment at firstname.lastname@example.org Do not email in any other id, it will not be considered then. File name must be your name and email subject must be Assignment_4(Your name). [Guidelines must be followed strictly]
- Plagiarism and copy will be dealt strictly.
Best of Luck J
Download Word Document from here:- Assignment 4