[Cs3] CS3 Lab 6 question

Mikhail Nesterenko mikhail at cs.kent.edu
Wed Feb 27 11:38:10 EST 2019


> Also what is the purpose of the const double weightToJam? I see that in the
> code provided:
> 
> if green apple weight < weightToJam (which is 10), add it to the jam.
> 
> However the maximum weight of an apple is set at 8, so all apples could
> then be added. Can we just remove weightToJam?
> 

The apples grow in weight when user-supplied "toGrow" weight is added
to each apple so, potentally, they may weigh more than 10 lbs. Small
green apples are going to jam.

Thanks,
--
Mikhail


More information about the cs3 mailing list