apples to count the number of apples in the basket, starting at 0.units to track the current total weight of the basket, starting at 0.units does not exceed 5000, add the apple to the basket.
b. Increment apples by 1.
c. Increment units by the weight of the current apple.apples.