July 2019
Beginner to intermediate
740 pages
16h 52m
English
All the calculations we will work with in this section are defined on the StockAnalyzer class; however, rather than having to run these for each of the assets we want to compare, we will also create the AssetGroupAnalyzer class (in the same module) that's capable of providing these metrics for a group of assets.
The StockAnalyzer and AssetGroupAnalyzer classes will share much of their functionality, which makes a strong argument for designing them with inheritance; however, sometimes, as in this case, composition can make more sense. When objects contain instances of other classes, it is referred to as composition. This design decision leaves us with a very simple UML diagram for the AssetGroupAnalyzer class: ...
Read now
Unlock full access