A number of attributes of the BenefitUnit and Person objects are inter-related and inter-dependent, but exist independently. This increases the likelihood of inconsistencies, and complicates maintenance of the codebase. It would be consequently be useful to consolidate the code to omit attributes that do not describe unique information. An example are the attributes that describe interpersonal relations male / female / children in a benefit unit and their associated identifiers. These relationships can be defined by a single vector in the benefit unit (members), with methods added that draw on the vector wherever necessary. Adding and removing members from a benefit unit would then involve simply adding or subtracting them from the vector.
A number of attributes of the BenefitUnit and Person objects are inter-related and inter-dependent, but exist independently. This increases the likelihood of inconsistencies, and complicates maintenance of the codebase. It would be consequently be useful to consolidate the code to omit attributes that do not describe unique information. An example are the attributes that describe interpersonal relations male / female / children in a benefit unit and their associated identifiers. These relationships can be defined by a single vector in the benefit unit (members), with methods added that draw on the vector wherever necessary. Adding and removing members from a benefit unit would then involve simply adding or subtracting them from the vector.