Observations and Measurements  

 
 

Quantity  

Before we describe the models for the various accounting patterns, we look at the Quantity type, whose subclass Money is a basic type used in the accounting patterns.

 

 

The Quantity type is very useful in recording measurements in computer systems. It combines both the magnitude and units. It also includes appropriate arithmetical and comparative operations. In other words, Quantity is a "whole value" that the user interface can interpret and display (it has its own print operation). Using this concept, we can represent monetary values (or Money) as quantities, using the currency as the unit. With quantities, we can easily deal with multiple currencies, rather than being tied to one currency.

Examples:

 

Conversion Ratio  

We saw that units have been used in modeling Quantity. Another concept that is interesting is, units allow us to convert quantities from one unit to another. For that purpose, we can model what are called conversion ratio objects:
 
 

As shown, we can use conversion ratio objects between units, and provide an operation called convertTo(Unit) which returns a new quantity in the desired unit.

Example: Conversion between inches and feet can be achieved by defining a conversion ratio from feet to inches with the number 12.

    As is evident, this model can handle most but not all kinds of conversion. Some conversions require more than a simple multiplication. For monetary values, whose units are currencies, the conversion ratios are not constant over time. This problem can be dealt with by having an attribute that indicates the time of applicability of the ratio. Actually, for conversions that change frequently over time, we can use Scenarios (described later).
 
 

Observation  

 
An observation is, making a qualitative statement about a person or a situation. Observations are similar to measurements where we make quantitative statements about an object. Consider measuring a person's gender. Gender has possible values: male, female. We can think of gender as being "what is being measured", and "male", "female" are two possible values for it. On the lines of measurement, we can devise a type, called "Category Observation". The full model is shown below:
 
 

 

Here, the subtype Category Observation is of interest to us. In the previous example, gender is an instance of Phenomenon Type, male and female are instances of Category, and the Object Observed is the person. So, an Observation, particularly, Category Observation, has a Category which is the possible set of values that the Object Observed may take, under this Observation. If we consider the banking domain, the Object Observed could be the state of the market. An example of a phenomenon type related to a Category Observation would be "people's conception of risk", having values such as "High", "Medium", "Low", etc. For a 'Measurement', phenomenon types are quantitative in nature, such as "interest rate", "height", "weight", etc.
 

 Banking Patterns Home Page
 
If you have comments or suggestions, email us!