Home Segments Index Top Previous Next

407: Mainline

Another virtue of data abstraction is that you can easily improve how data are stored. In this chapter, you have seen an example in which there is an efficiency-motivated switch from a price-based structure definition to a total-cost-based structure definition. The switch makes your code more efficient, reducing the number of multiplications required, should you have a need to work more with total costs than with prices.