January 2020
Intermediate to advanced
532 pages
13h 31m
English
To illustrate the concept of this pattern, we will implement some functions for the personal asset data types that we developed in Chapter 2, Modules, Packages, and Data Type Concepts. As you may recall, the abstract types for the asset type hierarchy are defined as follows:
abstract type Asset endabstract type Property <: Asset endabstract type Investment <: Asset endabstract type Cash <: Asset endabstract type House <: Property endabstract type Apartment <: Property endabstract type FixedIncome <: Investment endabstract type Equity <: Investment end
The Asset type is at the top of the hierarchy and has the Property, Investment, and Cash subtypes. At the next level, House and Apartment are subtypes of ...
Read now
Unlock full access