Answer to Question #23030 in Java | JSP | JSF for Rajuu
Design a currency Converter class in java whose object will handle conversion of three currencies (Dollar, Peso, Pound). A single object of the new currency Converter class you design here will handle all these three currencies. Instead of having specific conversion methods such as toDollar, toPound and so forth, the new currency Converter class supports one generic conversion method call exchange. The method has three arguments: fromCurrency, toCurrency and amount. The first two arguments are String and give the names of currencies. The third argument is the amount that need to be converted. For example, to convert RM250 to dollar, we write:
dollar = converter.exchange(‘peso”, “dollar”, 250.0);
To set the exchange rate for a currency, we use the setRate method. This method takes three arguments. The first two arguments are the currency names, and the third argument is the rate. For example, if the exchange rate for dollar is 2.1 Dollar to Peso1, then we write:
converter.setRate(“dollar”, “peso”, 2.1);
In addition, the class also have the following method:
updateRate (“fromCurrency”, “toCurrency”, newRate) - The first two arguments are the currency names, and the third argument is the new exchange rate.
Finally, test your program by creating its object in the main() method.
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.
Dread it, run from it, the end of summer arrives all the same. And now it's here. It’s finally August.…
APPROVED BY CLIENTS
Thank you so much for your hard work. very impressive indeed ! I really appreciate your effort, however, the alias-listing is missing half the names. I got a list with 9 names only in it after I compiled the code, but very good job over all nonetheless. thank you all again and special thanks to the one worked on this assignment, and I'll def contact you in the future should I ever feel the need of an expert!!