-
Notifications
You must be signed in to change notification settings - Fork 14
Adding Cost/Currency/Price #39
Copy link
Copy link
Open
Description
Creating a Issue based in @mschmitz2's excellent suggestion in #19 to add cost.
It has been on my list for some time now so lets give it a go!
I have added following (still subject to change..)
Cost f1 = new Cost(10, CostUnit.USDollar); //10 $
Energy e1 = new Energy(10, EnergyUnit.KilowattHour); //10 kWh
EnergyCost test = f1 / e1; //1 $/kWhAny other name we should consider for the unit representing $£€?
Price Cost Currency
Name when combining it with other units:
EnergyCost CostOfEnergy EnergySpecificCost EnergyPrice
What do you guys think?
Also, we need to figure out how to convert between the different Currencies.
- Have a hardcoded conversion that will (automatic) be updated with each build.
- Have a way you can override the hardcoded conversions with your own
- an option to Connect to a public Currency exchange API that will give you the current currencies
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels