Question: COP2271 MATLAB Module 03 Activities Activity C Develop a currency converter to convert between US dollars, the Canadian dollar, and Japanese Yen given the following


COP2271 MATLAB Module 03 Activities Activity C Develop a currency converter to convert between US dollars, the Canadian dollar, and Japanese Yen given the following conversions: 1 USD = 1.24 CAD 1 USD = 108.59 JPY Program Inputs Available Currencies: A)USD B)CAD C)YEN Enter transaction amount: - User will always enter a positive dollar amount; no error checking needed. Transaction currency: - User will always choose A,B, or C; no error checking needed. Currency to convert to: - User will always choose A,B, or C; no error checking needed. Program Outputs Converted value: XXX YYY - replace XXX with the final converted value and YYY with the currency name Conversion not needed... Display this message if the user picks the same currency twice. Sample Output Test Case 1: Available Currencies: A) USD B) CAD C) YEN Enter transaction amount: 5.00 Transaction currency: A Currency to convert to: A Conversion not needed... COP2271 MATLAB Module 03 Activities Test Case 2: Available Currencies: A) USD B) CAD C) YEN Enter transaction amount: 100.50 Transaction currency: A Currency to convert to: B Converted value: 124.62 CAD Test Case 3: Available Currencies: A) USD B) CAD C) YEN Enter transaction amount: 20.00 Transaction currency: B Currency to convert to: C Converted value: 1751.45 YEN Test Case 4: Available Currencies: A) USD B) CAD C) YEN Enter transaction amount: 20.00 Transaction currency: C Currency to convert to: B Converted value: 0.23 CAD Test Case 5: Available Currencies: A) USD B) CAD C) YEN Enter transaction amount: 5.00 Transaction currency: B Currency to convert to: A Converted value: 4.03 USD
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
