Write C++ program to currency exchange, which is the process that allows customers to exchange one currency for another. The program will include decision-making statements, loops, arrays, file I/O, string, and functions. You should follow the details: As you might know, currency rates are influenced by several factors such a country's economic performance. Thus, it is better to get the up-to-date currency rates from an external source as it is easier to update. You should read the data from the file “ExchangeRate.txt”. “ExchangeRate.txt” file contains: 1.00 SAR 0.08 KWD 1.00 SAR 0.97 QAR 1.00 SAR 0.98 AED 1.00 SAR 0.10 BHD 1.00 SAR 0.10 OMR 1.00 QAR 0.08 KWD 1.00 QAR 1.01 AED 1.00 QAR 0.10 BHD 1.00 QAR 0.11 OMR 1.00 KWD 12.00 AED 1.00 KWD 1.23 BHD 1.00 KWD 1.26 OMR 1.00 AED 0.10 BHD 1.00 AED 0.10 OMR 1.00 BHD 1.02 OMR The program should print the available currencies for exchange which are: o SAR --> Saudi Arabia Riyal o KWD --> Kuwaiti Dinar o QAR --> Qatar Riyal o AED --> United Arab Emirates Dirham o BHD --> Bahraini Dinar o OMR --> Omani Rial Please make sure the user only enters the correct currency abbreviations (e.g., SAR). Otherwise, ask them to re-enter the currency until they get it right. For usability reasons, the user can enter their currencies in capital or small letters (i.e., SAR, SaR, sar, and SAR are all correct inputs). You are expected to use at least one void function and one value returning function. Feel free to use them for any part of your program. The data file shows the currency exchange between two currencies. For example, if the file shows “1.00 KWD= 12.27 SAR”, you can use this line to exchange KWD to SAR and also exchange SAR to KWD Comments that: o Explain the purpose of the program o Identify the owners (who wrote it) and their ID o Identify the input and output of the code Comments that explain the purpose of every function, the function formal parameters (arguments) and return value. White spaces such as indentation, spaces, and blanks

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write C++ program to currency exchange, which is the process that allows customers to exchange one currency for another. The program will include decision-making statements, loops, arrays, file I/O, string, and functions.

  • You should follow the details:
  • As you might know, currency rates are influenced by several factors such a country's
    economic performance. Thus, it is better to get the up-to-date currency rates from an
    external source as it is easier to update. You should read the data from the file “ExchangeRate.txt”.
  • “ExchangeRate.txt” file contains:

1.00 SAR 0.08 KWD

1.00 SAR 0.97 QAR

1.00 SAR 0.98 AED

1.00 SAR 0.10 BHD

1.00 SAR 0.10 OMR

1.00 QAR 0.08 KWD

1.00 QAR 1.01 AED

1.00 QAR 0.10 BHD

1.00 QAR 0.11 OMR

1.00 KWD 12.00 AED

1.00 KWD 1.23 BHD

1.00 KWD 1.26 OMR

1.00 AED 0.10 BHD

1.00 AED 0.10 OMR

1.00 BHD 1.02 OMR

  • The program should print the available currencies for exchange which are:
    o SAR --> Saudi Arabia Riyal
    o KWD --> Kuwaiti Dinar
    o QAR --> Qatar Riyal
    o AED --> United Arab Emirates Dirham
    o BHD --> Bahraini Dinar
    o OMR --> Omani Rial
    Please make sure the user only enters the correct currency abbreviations (e.g., SAR). Otherwise, ask them to re-enter the currency until they get it right.
  • For usability reasons, the user can enter their currencies in capital or small letters (i.e., SAR, SaR, sar, and SAR are all correct inputs).
  • You are expected to use at least one void function and one value returning function. Feel free to use them for any part of your program.
  • The data file shows the currency exchange between two currencies. For example, if the file shows “1.00 KWD= 12.27 SAR”, you can use this line to exchange KWD to SAR and also exchange SAR to KWD
  • Comments that:
    o Explain the purpose of the program
    o Identify the owners (who wrote it) and their ID
    o Identify the input and output of the code
  • Comments that explain the purpose of every function, the function formal parameters
    (arguments) and return value.
  • White spaces such as indentation, spaces, and blanks
o BHD --> Bahraini Dinar
o OMR --> Omani Rial
Please make sure the user only enters the correct currency abbreviations (e.g., SAR).
Otherwise, ask them to re-enter the currency until they get it right.
For usability reasons, the user can enter their currencies in capital or small letters (i.e.,
SAR, Sab, sar, and SAR are all correct inputs).
You are expected to use at least one void function and one value returning function.
Feel free to use them for any part of your program.
The data file shows the currency exchange between two currencies. For example, if
the file shows "1.00 KWD= 12.27 SAR", you can use this line to exchange KWD to SAR
and also exchange SAR to KWD
• Comments that:
o Explain the purpose of the program
& Identify the owners (who wrote it) and their ID
o Identify the input and output of the code
Comments that explain the purpose of every function, the function formal parameters
(arguments) and return value.
White spaces such as indentation, spaces, and blanks
Transcribed Image Text:o BHD --> Bahraini Dinar o OMR --> Omani Rial Please make sure the user only enters the correct currency abbreviations (e.g., SAR). Otherwise, ask them to re-enter the currency until they get it right. For usability reasons, the user can enter their currencies in capital or small letters (i.e., SAR, Sab, sar, and SAR are all correct inputs). You are expected to use at least one void function and one value returning function. Feel free to use them for any part of your program. The data file shows the currency exchange between two currencies. For example, if the file shows "1.00 KWD= 12.27 SAR", you can use this line to exchange KWD to SAR and also exchange SAR to KWD • Comments that: o Explain the purpose of the program & Identify the owners (who wrote it) and their ID o Identify the input and output of the code Comments that explain the purpose of every function, the function formal parameters (arguments) and return value. White spaces such as indentation, spaces, and blanks
Write C++ program to currency exchange, which is the process that allows customers to
exchange one currency for another. The program will include decision-making statements,
loops, arrays, file I/O, string, and functions.
You should follow details.
As you might know, currency rates are influenced by several factors such a country's
economic performance. Thus, it is better to get the up to date currency rates from an
external source as it is easier to update. You should read the data from the file
"ExchangeRate.txt".
• "ExchangeRate.txt" file contain:
1.00 SAR 0.08 KWD
1.00 SAR 0.97 QAR
1.00 SAR 0.98 AED
1.00 SAR 0.10 BHD
1.00 SAR 0.10 OMR
1.00 QAR 0.08 KWD
1.00 QAR 1.01 AED
1.00 QAR 0.10 BHD
1.00 QAR 0.11 OMR
1.00 KWD 12.00 AED
1.00 KWD 1.23 BHD
1.00 KWD 1.26 OMR
1.00 AED 0.10 BHD
1.00 AED 0.10 OMR
1.00 BHD 1.02 OMR
The program should print the available currencies for exchange which are:
o SAR --> Saudi Arabia Riyal
o
KWD --> Kuwaiti Dinar
o QAR --> Qatar Riyal
o AED --> United Arab Emirates Dirham
Transcribed Image Text:Write C++ program to currency exchange, which is the process that allows customers to exchange one currency for another. The program will include decision-making statements, loops, arrays, file I/O, string, and functions. You should follow details. As you might know, currency rates are influenced by several factors such a country's economic performance. Thus, it is better to get the up to date currency rates from an external source as it is easier to update. You should read the data from the file "ExchangeRate.txt". • "ExchangeRate.txt" file contain: 1.00 SAR 0.08 KWD 1.00 SAR 0.97 QAR 1.00 SAR 0.98 AED 1.00 SAR 0.10 BHD 1.00 SAR 0.10 OMR 1.00 QAR 0.08 KWD 1.00 QAR 1.01 AED 1.00 QAR 0.10 BHD 1.00 QAR 0.11 OMR 1.00 KWD 12.00 AED 1.00 KWD 1.23 BHD 1.00 KWD 1.26 OMR 1.00 AED 0.10 BHD 1.00 AED 0.10 OMR 1.00 BHD 1.02 OMR The program should print the available currencies for exchange which are: o SAR --> Saudi Arabia Riyal o KWD --> Kuwaiti Dinar o QAR --> Qatar Riyal o AED --> United Arab Emirates Dirham
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY