oship-dev team mailing list archive
-
oship-dev team
-
Mailing list archive
-
Message #01238
[Bug 611387] [NEW] some issues in class DvProportion
Public bug reported:
It seems that it is not necessary to test for the types of arguments in the initializer. On the other hand, the invarians below are not enforced. In implementing these invariants, the values in ProportionKind should be used:
Type_validity: valid_proportion_kind(type)
Precision_validity: precision = 0 implies is_integral
Is_integral_validity: is_integral implies (numerator.floor = numerator and denominator.floor = denominator)
Fraction_validity: (type = pk_fraction or type = pk_integer_fraction) implies is_integral
Unitary_validity: type = pk_unitary implies denominator = 1
Percent_validity: type = pk_percent implies denominator = 100
The initializer lacks the magnitudeStatus argument and so does the
superclass initializer. Magnitude is not an attribute in this class, it
is a method. It seems that it would be better to implement attribute as
a method in DvQuantified.
The methods compare ("<") and isStrictlyComparableTo are not
implemented.
The methods add, subtract and negate in DvAmount are not implemented.
It would be interesting to define a representation value for this class,
wouldn't it?
** Affects: oship
Importance: High
Status: New
** Changed in: oship
Importance: Undecided => High
** Changed in: oship
Milestone: None => 1.5
--
some issues in class DvProportion
https://bugs.launchpad.net/bugs/611387
You received this bug notification because you are a member of OSHIP
Development Team, which is subscribed to Open Source Health Information
Platform.
Status in Open Source Health Information Platform (OSHIP): New
Bug description:
It seems that it is not necessary to test for the types of arguments in the initializer. On the other hand, the invarians below are not enforced. In implementing these invariants, the values in ProportionKind should be used:
Type_validity: valid_proportion_kind(type)
Precision_validity: precision = 0 implies is_integral
Is_integral_validity: is_integral implies (numerator.floor = numerator and denominator.floor = denominator)
Fraction_validity: (type = pk_fraction or type = pk_integer_fraction) implies is_integral
Unitary_validity: type = pk_unitary implies denominator = 1
Percent_validity: type = pk_percent implies denominator = 100
The initializer lacks the magnitudeStatus argument and so does the superclass initializer. Magnitude is not an attribute in this class, it is a method. It seems that it would be better to implement attribute as a method in DvQuantified.
The methods compare ("<") and isStrictlyComparableTo are not implemented.
The methods add, subtract and negate in DvAmount are not implemented.
It would be interesting to define a representation value for this class, wouldn't it?
Follow ups
References