Business logic encodes business knowledge as software behavior. In a car-rental application, it determines a price from the rental period, car type, contract type, holidays, mileage, and marketing discounts. section 1.1
Business logic commonly expresses rules as conditions and consequences:
- Apply a 10% surcharge when the rental period contains a national holiday. section 1.1
- Apply a 5% discount to the per-day rate when the rental exceeds a whole week. section 1.1
- Add an environmental fee of $10 per day when the car is a genuine gas guzzler. section 1.1
Table 1.1 Natural language expressing car rental business knowledge
|
If the rental period contains a national holiday, then a surcharge rate of 10% is applied to the rental price for that holiday.
|
|
If the length of the rental period exceeds a whole week, then a discount rate of 5% is applied to the per-day rate.
|
|
If the car is a genuine gas guzzler, then an additional environmental fee of $10/day is applied.
|
Natural-language rules make the business knowledge behind a price quote explicit and usable by business experts. section 1.1









