Question: create a currency convertor program in JAVA. It will store conversion rates between a currency and the US$ for a month. The program flow is
create a currency convertor program in JAVA. It will store conversion rates between a currency and the US$ for a month. The program flow is as follows:
(Part 1)Get user input for the historical data. Historical data will be the currency, day of month (1-31) and conversion rate. Keep getting input until a null or space is entered for the currency. Assume 3 currencies max will be entered. Store data in a 2-dimensional array. I recommend creating a 33(rows) by 5 (columns) matrix. Rows are day of month, columns are currency. Each cell will store the rate that was input for that Currency/Day of Month pair. Once 3 unique currencies are entered, do not accept any more unique currencies.
(Part 2) Get user input to lookup rates User will input a currency, day of month and an amount. You will check if a rate exists for that currency & day. If it does you will multiply the amount by the rate and output the US$ equivalent. If the currency/date pair doesn't exist or there's no rate for it, output "Data Not Available" Keep requesting input until user enters null or space for currency and then terminate the program
Step by Step Solution
3.36 Rating (152 Votes )
There are 3 Steps involved in it
Heres an example implementation of the currency converter program in Java based on your requirements java import javautilScanner public class Currency... View full answer
Get step-by-step solutions from verified subject matter experts
