Design Document Developed in Class

  1. A high level description of the problem.
     Create a program that will, for each given type of ice cream,
     compute the amount of gallons needed for the next day.  
  2. A list of questions about the problem.
     We did not do this.  
  3. A description of the problem's input/output
         Input:  
             The type of day
             A file containing flavors and the number of cones sold 
                 on an average day
         Output:
             For each flavor, the gallons of ice cream needed 
  4. A Set of test cases, both input and output
    Day Type     Flavor    Average  Cones Needed  oz     Gallons
     Normal      Vanilla    100     100 * 1       100*8  800/128 = 7
     Busy        Vanilla    100     100 * 2       200*8  1600/128 = 13
     Holiday     Vanilla    100     100 * 4       400*8  3200/128 = 25
    
          Compute the multiplier   Holiday -> 4
          Multiply cones by the multiplier   100 * 4
          Multiply the total cones by 8      400 * 8
          Divide by 128, round up            3200/128 = 25 
  5. A program decomposition showing how the modules will interact.
  6. Algorithms for the main and all sub algorithms required to solve this problem.
    To compute gallons needed:
    	Needed =Number of cones * 8 / 128
    	Round up needed.
    
    To compute the multiplier
    	If the day is normal
    		Multiplier  = 1
               Else if the day is busy
    		Multiplier = 2
               Else if the day is a holiday
                         Multiplier = 4
    
    Main Algorithm
    Get the type of day
    Compute the multiplier
    For each flavor in the file
    	Get the flavor type and the number of cones sold on an average day
    	Number of cones = number of cones * multiplier
    	Compute the gallons needed
    	Print the flavor and gallons needed