Currency Conversion Design
Analysis
Process:
1. Display Menu
2. Get Foreign Value
3. Convert Currency
4. Display Results
Input:
1. Currency Type (integer: Currency Type)
2. International Value (real: International Value)
3. U.S. Value (real: U.S. Value)
Output:
1. Currency Type (integer: Currency Type) 2. International Value (real: International Value) 3. U.S. Value (real: U.S. Value)
Input-Process-Output Chart
Input Process Output
Name:
Type:
Range:
Display Menu Name:
Type:
Range: Currency Type
Integer
1-6
Name:
Type:
Range: International Value
Real
0-1,000,000 Get Foreign Value Name:
Type:
Range: International Value
Real
0-1,000,000
Name:
Type:
Range:
Name:
Type:
Range: International Value
Real
0-1,000,000
Currency Type
Integer
1-6 Convert Currency Name:
Type:
Range: US Value
Real
> 0
Name:
Type:
Range:
Name:
Type:
Range:
Name:
Type:
Range:
Currency Type
Integer
1-6
International Value
Real
0-1,000,000
US Value
Real
> 0 Display Results Name:
Type:
Range:
Name:
Type:
Range:
Name:
Type:
Range: Currency Type
Integer
1-6
International Value
Real
0-1,000,000
US Value
Real
> 0
Design
Hierarchy Chart
Flowcharts
Control Flow Diagram—Main Control
Control Flow Diagram—Display Menu
Control Flow Diagram—Get_Int_Value
Control Flow Diagram—Convert Currency
Control Flow Diagram—Display_Results
Pseudocode
Main program
Declare selection as integer Declare currency Type as Integer Declare International Value as Real