non-profit organization

FIND A SOLUTION AT Academic Writers Bay

Suppose you are in charge of a non-profit organization that receives donated gifts and distributes them toneedy children. You are given a list of children with their ages (0 to 16 years old).For each gift, you are given the following information:Retail priceSize of gift (cubic feet)Range of suitable ages
Let: P = sum of retail prices of the giftsN = total number of childrenei = | P/N – sum of retail prices for gifts given to child i |You must minimize Σ ei for the N children, subject to the following constraints:1. Each gift must be given to exactly one child.2. No child may be given a gift that is not intended for their age.3. Each child must receive at least one large and one medium gift, where 1 ft3 <= medium gift <= 2 ft3, and2 ft3 < large gift.4. The number of gifts received by each child can be no less than the average – 1 and no more than theaverage + 1.
Important:The sum of the e_i values MUST be the absolute lowest value that is possible for the given input file.
Command line: ./gifting inputFileName outputFileName
Rubric:Compiles, good programming style, processes command line arguments 15 pts.Produces correctly formatted output file with all children and gifts included 10 pts.Produces optimal solution 70 pts.Compute time/space efficiency, creativity 5 pts. + extra credit possibleNotes:1. Extra credit could possibly be large2. Programming style based on Department Standards (see Programming Standards file on Canvas)3. A signed Academic Integrity statement must be submitted to receive creditPrograms that do not compile and produce an executable on Clark will not be gradedPrograms MUST be written in C/C++
Input format:
Plain text tab-delimited file. See example on next page. Child1 age 8Child2 age 6Child3 age 4
Gifts Price Size AgesG1 12 1.3 7-14G2 15 2.5 anyG3 8 1.5 0-5G4 22 2.8 6-16G5 10 1.5 anyG6 11 2.1 any
Output format:
The output should be a plain text tab-delimited file. It must begin with ‘Sum_e_i x’, where x is the sum of the eivalues. This should be followed by N rows, one for each child (in order), with their assigned gifts and ei valueas follows:
Sum_e_i 12.0Child1 G1 G6 3Child2 G5 G4 6Child3 G3 G2 3

Order from Academic Writers Bay
Best Custom Essay Writing Services