Hello everybody! I am currently take an IT class and have hit a snag. I am designing a currency conversion program. The assignment asks me to Generate a set of test inputs and expected results for the Currency Conversion program. I have looked and looked and can find little documention on the process of generating these test inputs. I am going to attach the design and hope someone can point me in the right direction or help me out.
Heres the Pseudocode
*Declare variable as integer*
*Declare exchange as integer*
*Declare international rate as real*
*Declare US currency rate as real *
Execute while user wants to continue
DISPLAY MENU
Get other country Value
Convert Currency
Display Results
End loop
Print exit message
End Main Module
Display Menu
Set continue = true
While continue = true
Display "Welcome to the Elite Currency convert"
Display "Choose currency to convert"
Display "Currently available Currency Types:"
Display "1: CAD"
Display "2: Pesos"
Display "3: Pounds"
Display "4: Yen"
Display "5: Francs"
Display "6: Exit program"
Display "Enter a selection:";
Input currency Type
If currency Type >= 1 AND currency Type <= 5 then
Set continue = false
else if currency Type = 6
Display “Currency conversion now shutting down”
continue = false
else
Display “"Error : Invalid menu selection."
continue = true
end if
end While
End Display Menu
Get International Value
Declare value as integer
Declare continue as real
Set continue = true
While continue = true
Display "Enter a currency amount: "
Input Country value
if Country value > 0 AND internationalize <= 3000000 then
continue = false
else
Display “"Error 1: Invalid currency amount"
continue = true
end if
end while
End Get Country Value
Convert Currency total
Declare rate as real
Select chosen currency type
Selection 1:
Set rate = 1.4680
Selection 2:
Set rate = 9.5085
Selection 3:
Set rate = .6085
Selection 4:
Set rate = 104,9;
Selection 5:
Set rate = 6.2561
default:
Set rate = 0.0
End Convert Currency
Display Results
Declare country as string
Declare currency as string
Choose target currency
selection CANADIAN:
country = "Canadian";
currency = "CAD";
selection MEXICAN:
country = "Mexico";
currency = "Pesos";
selection ENGLISH:
country = "England";
currency = "Pounds";
selection JAPANESE:
country = "Japan";
currency = "Yen";
selection FRENCH:
country = "French";
currency = "Francs";
default:
Country = "No country";
currency = "";
End selection
if currency <> “” then
Display “The value of “, international Value, “ “ , country Value, “ “, currency, “ is “,
us Value, “ dollars”
else
Display "Error 5: Invalid currency selection."
end if
End Output display currency results