This commit is contained in:
louiscklaw
2025-01-31 19:15:17 +08:00
parent 09adae8c8e
commit 6c60a73f30
1546 changed files with 286918 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
public class Ex4 {
public static void main(String[] args) {
CurrencyConverter yenConverter = new CurrencyConverter(115.7, 0.0005);
CurrencyConverter euroConverter = new CurrencyConverter(0.9881, 0.0003);
yenConverter.setLargeAmount(50000);
euroConverter.setLargeAmount(50000);
int yens = 1500000;
System.out.println(yens + " yens = US$ " + yenConverter.toUSDollar(yens));
int usd = 20000;
System.out.println("US$ " + usd + " = " + yenConverter.fromUSDollar(usd) + " yens");
int euros = 170000;
System.out.println(euros + " euros = US$ " + euroConverter.toUSDollar(euros));
usd = 20000;
System.out.println("US$ " + usd + " = " + euroConverter.fromUSDollar(usd) + " euros");
}
}