Fundamentals of Programming with Algorithms and Logic

Submitted by: Submitted by

Views: 115

Words: 315

Pages: 2

Category: Business and Industry

Date Submitted: 10/28/2013 02:55 PM

Report This Essay

Currency Conversion

By R.Branch

Fundamentals of Programming with Algorithms and Logic

IT/210

4/8/2012

Facilitator: Daryl Sowell

Currency Conversion Hierarchy

Application Requirements

Input Process Output

Display “Please choose a currency to convert” Display Menu

Currency choice is “*”

Display “Is this correct? Type Y for yes and N for no” Get Foreign Value

Currency choice confirmed

Display “Enter currency amount” Convert Currency

Currency amount is “*”

Display “Is this amount correct? Type Y for yes and N for no”

Display Results

Converted amount is “*” in US Dollars

Control Flow Diagram—Main Control

Control Flow Diagram—Display Menu

Control Flow Diagram - Get Int Values

Control Flow Diagram - Convert Currency

Control Flow Diagram - Display Results

Current Conversion Rates

1 Canadian dollar (CAD) = 1.468 United States dollar (USD)

104.92 Japanese yen (JPY) = 1United States dollar

1.6433 British pounds (GBP) = 1United States dollar

9.5085 Mexican peso (MXN) = 1 United States dollar

1.307 Euro (EUR) = 1 United States dollar

Input Expected Output Comments

Currency amount 2000000 Error Message Input out of valid range

Currency choice>6 Error Message Invalid menu selection

Currency choice=0 Error Message Invalid menu selection

Currency choice 2000000 then

Display “Error, amount entered is too high”

Set Count = +1

If Count > 3 then

Exit Program

Display “Please enter your currency selection”

If Input currency type >=1 and 3 then

End for

Exit Program

Calculations Module

If Currency = 1

Set CAD = Amount * 1.468

If Currency = 2

Set JPY = Amount * 104.92

If Currency = 3

Set GBP = Amount / 1.6433

If Currency = 4

Set MXN = Amount * 9.5085

If Currency = 5

Set EUR = Amount * 1.307

End for

Display Module

If Currency = 1...