Depreciation value is the decrease in an asset’s value over time, caused by factors such as use, aging, or obsolescence. In an IT asset management system, purchase-date information can support calculating a hardware asset’s depreciation value for use against organizational taxes. section 3.3 section 3.1
Treat depreciation as a calculation policy rather than a fixed property of an asset. An Asset holds FundingDetails, and FundingDetails delegates the calculation to a DepreciationStrategy. This keeps the asset model independent of any one depreciation method and lets the method be changed when needed. section 3.3
The modeled strategy interface has one calculate_depreciation operation and supports these implementations:
- StraightLineDepreciationStrategy. section 3.3
- DecliningBalanceDepreciationStrategy. section 3.3
- DoubleDecliningDepreciationStrategy. section 3.3
- NoDepreciationStrategy. section 3.3
Making an asset model adaptable
For hardware that inherits from Asset, model FundingDetails as a class instead of an unrestricted string. Give it a depreciation strategy, then select the appropriate strategy for each asset rather than embedding a single calculation in Asset. The same model can also support requests for total depreciation across assets belonging to a business line. section 3.3
This design uses the Dependency Inversion Principle: the higher-level asset model depends on the DepreciationStrategy interface, not on a particular calculation. Review any generated class diagram against the required methods, relationships, and business rules before adopting it. section 3.3
Figure 3.5 We have added a depreciation strategy to our object model. This introduction allows us to swap out the method by which we can calculate the depreciation of an asset.
Inspect the class-diagram change that connects FundingDetails to DepreciationStrategy and shows the interchangeable concrete strategies. section 3.3
