1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Write a description of class MainApplication here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class MainApplication
  8. {
  9. public static void main(String[] args){
  10. CurrencyConverter wuTang = new CurrencyConverter();
  11. System.out.println("Welcome to Wu-Tang Financial \n");
  12. System.out.println("We can convert any supported currency to any other supported currencey \n");
  13. System.out.println("Currently Supported Currencys: \n" + "US Dollar \n" + "Euro \n" +
  14. "British Pound \n" + "Indian Rupee \n" + "Australian Dollar \n" + "Canadian Dollar \n"
  15. + "Singapore Dollar \n" + "Swiss Franc \n" + "Malaysian Ringgit \n" + "Japanese Yen \n"
  16. + "Chinese Yuan Renminbi \n" );
  17. double convertFrom = wuTang.getStringInput("What money you got?");
  18. double convertTo = wuTang.getStringInput("What money you want?");
  19. double amount = wuTang.getDoubleInput("How much you got?");
  20. String converted = String.format("%.2f", wuTang.convertCurrency(convertFrom,convertTo,amount));
  21. System.out.println("Hey, Dirty; baby convert my money....");
  22. System.out.println( converted + " is what you get.");
  23. }
  24. }