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 screen) |
Main Module
Display Module
User Input Module
Menu Module
Calculation Module
Control Flow Diagram—Main Control
-------------------------------------------------
Begin
Menu Module Quit
?
Thank you for using the currency conversion program.”
User Input Module
Yes
No
Calculation Module
Display Module
End
-------------------------------------------------
Control Flow Diagram—Menu Module
Begin
Welcome message
Valid selection ?
Error
4
:
Invalid menu selection
No
Yes
End
Quit
?
Yes
Write “Are you sure?”
Quit
Verified
?
Yes
Select foreign currency type
Is selected currency correct?
No
Conversion
Verified
?
No
Yes
No |
Control Flow Diagram—User Input Module
Please enter the amount of foreign currency you would like to convert.
Write “Please enter a non-negative number.”
Input ForeignCurrency
Write “Invalid entry. Please try again.”
|
Control Flow Diagram—Calculation Module
French?
Japanese?
Mexican?
Begin
Canadian
?
Rate = 1.4680
English
?
No
No
No
No
No Yes
Yes
Yes
Yes
Yes
Rate = 9.5085
Rate = 0.6085
Rate = 104.9200