some issues in class DvProportion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OSHIPpy |
New
|
High
|
Unassigned |
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_proportio
Precision_validity: precision = 0 implies is_integral
Is_integral_
Fraction_validity: (type = pk_fraction or type = pk_integer_
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 isStrictlyCompa
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?
Related branches
Changed in oship: | |
importance: | Undecided → High |
milestone: | none → 1.5 |
affects: | oship → oshippy |
Changed in oshippy: | |
milestone: | 1.5 → none |