oshippy-dev team mailing list archive
-
oshippy-dev team
-
Mailing list archive
-
Message #00019
[Bug 611387] [NEW] some issues in class DvProportion
You have been subscribed to a public bug:
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: oshippy
Importance: High
Status: New
--
some issues in class DvProportion
https://bugs.launchpad.net/bugs/611387
You received this bug notification because you are a member of OSHIPpy Developers, which is subscribed to OSHIPpy.