Build nested records and pure quotation functions

Original practice scenario, not an identified course case: a parcel quote uses id, box dimensions and mass. Define Dimensions(length,width,height) nested in Parcel(id,box,grams). Each dimension is 1..20, mass is 1..5000 grams and id is 1..999. Write value-parameter functions for volume and price in cents. The price is 200 cents base plus 75 cents per started 500-gram band, plus 120 cents if volume is strictly greater than 1000. Write a full program reading id length width height grams and printing id=I volume=V price=P. Avoid floating-point rounding. Explain the band counts at 500 and 501 grams, the surcharge at volume exactly 1000, and why these bounds are safe for int.


