Professional Documents
Culture Documents
Currency Conversion Isaac D. Samaniego IT 210 Mr. Mohamed Meky
Currency Conversion Isaac D. Samaniego IT 210 Mr. Mohamed Meky
Isaac D. Samaniego
IT 210
Menu
Convert United States Convert specified foreign
currency to specified currency to United States
foreign currency currency
1. The program will present a series of user screens that prompts the user for specified
input.
3. The main user screen should have a short description saying how to use the program.
4. The calculation should be executed only after all the valid input values are provided.
5. The program will allow the user to clear all the input fields and do the calculations over.
Input-Process-Output Chart
Design
Hierarchy Chart
Currency
Conversion
Begin
Display_Menu
No
End
Get Int Value
Convert
Concurrency
Display
Results
Control Flow Diagram—Display Menu
Begin
List menu
items
Get Selection
Yes
Yes
Verify Quit No
Continue with Verified?
conversion
Conversion No
Verified?
Yes
Yes
End
Control Flow Diagram—Get_Int_Value
Begin
Prompt for
input
Get input
Yes
Yes
End
Control Flow Diagram—Convert Currency
Begin
Canadian
Yes Rate = Canadian Rate
?
No
Mexican
Yes Rate = Mexican Rate
?
No
English
Yes Rate = English Rate
?
No
Japanese
Yes Rate = Japanese Rate
?
No
French
Yes Rate = French Rate
?
No
Rate = 0.0
US Value =
Rate*Int_Value
End
Control Flow Diagram—Display Results
Begin
No
No
No
No
No
Nation = null
Currency = null
No
No
End
Psuedocode
Main Module
Declare Nationality as string
Declare CurrencyType as integer
Declare CurrencyAmount as real
Declare USDollar as real
Declare QuitProg as string
Call Input Module
Call Check Module
Call Currency Type Module
Call Canadian Module
Call Mexican Module
Call English Module
Call Japanese Module
Call French Module
Call Exit Module
Call Output Module
Input Module
Decleare CurrencyType as integer
Canadian Module
Declare CurrencyAmount as real
Declare USDollar as real
Nationality = “Canadian Dollars”
English Module
Declare CurrencyAmount as real
Declare USDollar as real
Nationality = “English Pounds”
Japanese Module
Declare CurrencyAmount as real
Declare USDollar as real
Nationality = “Japanese Yen”
Exit Module
Declare QuitProg as string
Output Module
Test Case 1:
Inputs:
CurrencyType = “U”
Expected Output:
Invalid currency selection. Please try again
Test Case 2:
Inputs:
CurrencyType = “0”
Expected Output:
Invalid currency selection. Please try again
Test Case 3:
Inputs:
CurrencyType = “9”
Expected Output:
Invalid currency selection. Please try again
----------Output Testing----------