
Good abstractions allow us to add new functionality to a system without constantly changing existing code. For example, think of a bookstore with a range of discounts like “Buy three books, get one free,” “45% off during Christmas,” and “Buy five e-books, get one printed copy free.” The marketing team proposes new discounts regularly, so the development team needs an easy way to add them to the code. A well-designed software system will have abstractions in place so developers can add new discounts with minimal effort.