123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * Enumeration class Currency - write a description of the enum class here
  3. *
  4. * @author (your name here)
  5. * @version (version number or date here)
  6. */
  7. public enum Currency
  8. {
  9. USD(1.00),
  10. EUR(0.94),
  11. GBP(0.82),
  12. INR(68.32),
  13. AUD(1.35),
  14. CAD(1.32),
  15. SGD(1.43),
  16. CHF(1.01),
  17. MYR(4.47),
  18. JPY(115.84),
  19. CNY(6.92);
  20. private double rate;
  21. private Currency(double rate){
  22. this.rate = rate;
  23. }
  24. public double getRate(){
  25. return this.rate;
  26. }
  27. }