Essay Currency Conversion Program

1252 Words Aug 10th, 2012 6 Pages
Application – Level Requirements

1. Get input from user. 2. User selects the type of currency they wish to convert. 3. User enters the amount of currency they wish to convert. 4. Currency is converted using established conversion rates. 5. Completed conversion amount is displayed for the user.

IPO Chart

Input | Process | Output | (Keyboard) User enters selection | Get type of foreign currency | ForeignCurrencyType (string) | (Keyboard) User enters amount | Get amount of foreign currency | ForeignCurrency (float) | Rate (float)ForeignCurrency (float) | Convert Currency | USDollar (float) | ForeignCurrencyType (string)ForeignCurrency(float)USDollar (float) | Display converted currency | (output results to
…show more content…
Input Continue If Continue = Y or y Then Call User Input Module
If Continue = N or n Then Write
Write “Please select the type of currency you wish to convert from the following: 1. Canadian Dollars 2. Mexican Pesos 3. English Pounds 4. Japanese Yen 5. French Francs 6. Quit”
Input ForeignCurrencyType
End If

End Menu Module

User Input Module
Start User Input Module Write “Please enter the foreign amount you would like converted into U.S. Dollars.” Input ForeignCurrency
While ForeignCurrency < 0 Write “Please enter a non-negative number.” Input ForeignCurrency
Write “Is this amount correct and ready to be converted?”
Input Verify If Verify = Y or y Then Call Calculation Module
End User Input Module

Calculation Module
Start Calculation Module If ForeignCurrencyType = Canadian then Rate = 1.4680
End If If ForeginCurrencyType = Mexican then Rate = 9.5085
End If If ForeignCurrencyType = English then Rate = 0.6085
End If If ForeignCurrencyType = Japanese then Rate = 104.9200
End If If ForeignCurrencyType = French then Rate = 6.2561
End If

USDollar = Rate*ForeignCurrency

End Calculation Module

Display Module
Start Display Module If ForeignCurrencyType = Canadian then Write

More about Essay Currency Conversion Program

Open Document