A program will calculate the cost of delivering a parcel. The cost depends on the weight of the parcel and the distance travelled. Which of these belong in the abstract model: weight, colour of the box, distance, name of the driver?
- The purpose of the model is to calculate a delivery cost.
- Weight and distance are used in the calculation, so they are essential details.
- The colour of the box and the name of the driver do not change the cost, so abstraction removes them.
Answer: Keep weight and distance; leave out the colour of the box and the name of the driver.