Generate a set of test inputs and expected results for the Currency Conversion program. Need to know if this looks right.
Test Case 1: Valid Selection = Canadian
Inputs:
Currency_Type = 1
Int_Value = 100
U.S._Value = 68.12
Expected Output:
The value of 100 Canadian dollars is 68.12 U.S dollars
Test Case 2: Valid Selection = Mexican Pesos
Inputs
Currency_Type = 2
Int_Value = 500
U.S._Value = 52.58
Expected Output:
The value of 500 Mexican Pesos is 52.58 U.S dollars
Test Case 3: Valid Selection = English Pounds
Currency_Type = 3
Int_Value = 55
U.S._Value = 90.39
Expected Output:
The value of 55 English Pounds is 90.39 U.S. dollars
Test Case 4: Valid Selection = Japanese Yen
Inputs:
Currency_Type = 4
Int_Value = 350
U.S._Value = 3.34
Expected Output:
The value of 350 Japanese Yen is 3.34 U.S. dollars
Test Case 5: Valid Selection = French Francs
Inputs:
Currency_Type = 5
Int_Value = 12
U.S._Value = 1.92
Expected Output:
The value of 12 French Francs is 1.92 U.S. dollars
Test Case 6: Valid Selection = Quit
Inputs:
Currency_Type = 6
Continue = “n”
Expected Output:
Thank you for using the Currency Conversion Program
Test Case 7: Illegal Currency Amount
Inputs:
Currency_Type = 3
Int_Value = “K”
Expected Output:
Error 2: Illegal Input
2 answers
You have obviously created some type of currency conversion program.
However, the rates that you are using are totally incorrect.
today's rates should be:
e.g. $100 (Canadian) = $99..34 US , you had $68.12
e.g. £55 = $87.71 US, you had $90.39
e.g. 12 French Francs ---- France has been using the Euro for some time now.
etc.
The arithmetic of your output is correct for the given exchange rate, that would simply be a matter of multiplying the number of units by the rate.
Time to update your textbook.