UNLV-ShaneD / unlvCS473kilo

5 stars 4 forks source link

Review new entities #8

Open UNLV-ShaneD opened 12 years ago

UNLV-ShaneD commented 12 years ago

Everyone: please note the MoneyValue data structure. The amount field is currency represented in cents. I have probably implemented it wrong - as an entity instead of a value. We will need to have addition and multiplication methods on MoneyValue as well. A get accessor method that returns a long would defeat the point of encapsulating currency - there would be no real reason to get the exact underlying value, anyway. The only "get" accessor we might need is for charting - in which case we could return a float in dollars. A method for getting a user-friendly string may also be needed. As for calculating rates with MoneyValue, we have multiplication and addition methods that can be used for this.

Dane: please review the data structures: ItemEntity ItemAdjustment TransactionEntity

Alex: please review the data structures: TransactionEntity TransactionDescription

Corbin: please review all the aforementioned data structures.

Feedback on any fields I'm missing (e.g. how is inflation stored for Items?) is appreciated. Speaking of inflation, I'm kind of undecided whether I should make a child class Item that has inflation properties or just add and remove an inflation adjustment automatically. Or perhaps every item should have an inflationAdjustment field, of which the referenced adjustment can be set to 0% or 100% effect.