Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This program allows the user to calculate the amount of money he or she will be given when travelling between countries. You can download some

This program allows the user to calculate the amount of money he or she will be given when travelling between countries.
You can download some current exchange rates from:
mdalton/Public/exchange. txt
The file has the following format.
CurrencyAbbreviation CurrencyName AmountForEachUS USD USDollar 1.0 EUR Euro 1.1 GBP BritishPound 1.3 CAD CanadianDollar 0.74dots In addition, every exchange will cost 1.5% of the mopey to be exchanged.
Your program will have two menus:
Enter the abbreviation for your current currency.
USD
EUR
CAD
AUD JPY
INR
CHF ZAR
ZAR HKD
SEK
MXN
Which do you choose?
And
Enter the abbreviation for your new currency.
USD
GBP
All inputs must be validated.
Write a function called exchange() that takes two arrays and an amount of money. This function returns the amount after the 1.5% exchange charge and then applies the exchange rate
Suggestion: Subtract the 1.5% exchange charge, then convert to USD, then convert to the desired currency
Sample Run:
Enter the abbreviation for your current currency.
USD
GBP
CAD
AUD JPY
INR
CHF
ZAR HKD
SEK
DKK
Which do you choose? GBP
Enter the abbreviation for your new currency.
USD
GBP
CAD
JPY
INR
ZAR
HKD SEK
MXN
DKK
Which do you choose? CAD
Enter the amount to exchange: 500
You get: 280.35 CanadianDollars
Write a function called loadArrays() that takes three arrays as parameters. This function opens an input file to get the current exchange rates.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

What three nations comprise NAFTA?

Answered: 1 week ago

Question

2. How will the team select a leader?

Answered: 1 week ago

Question

3. What may be the goal of the team?

Answered: 1 week ago