You are on page 1of 10

Application-Level Requirements List 1. Main Module 2. Input Module 3. Conversion Module 4. Output Module 5.

Display Module/End Module

Input-Process-Output Chart |Input |Currency Selection |Canadian Dollars |Mexican Pesos |English Pounds | |Japanese Yen | |French Francs | | | |Exit | | | |Process |Get user input |Convert currency to US |Dollars | | | | | | |Output |Currency Type |US Dollar Conversion |

|Return User to Main Menu |Main Menu

Hierarchy Chart Complete a hierarchy chart for the application above by typing into the textboxes below. Design Main program Declare Type as integer Declare 1 as string Declare 2 as string Declare 3 as string Declare 4 as string

Declare 5 as string Declare Amount as real Declare MP_XRate as real Declare CD_XRate as real Declare EP_XRate as real Declare JY_XRate as real Declare FF_XRate as real Declare USD as real Call Get Amount Module Call Calculate Exchange Module Call Output Conversion Module Display End main module Get Currency Type Declare Type as integer Declare 1 as string Declare 2 as string Declare 3 as string Declare 4 as string Declare 5 as string Set Type = 1, 2, 3, 4, or 5 Set 1 = Mexican Pesos Set 2 = Canadian Dollar Set 3 = English Pound Set 4 = Japanese Yen Set 5 = France Francs Repeat Write, What is the type of currency you wish to convert? 1 = Mexican Pesos, 2 = Canadian Dollar, 3 = English Pounds, 4 = Japanese Yen, 5 = France Francs Input Type = 1, 2, 3, 4, or 5 Until Response = 1, 2, 3, 4, or 5 Get Amount Calculate Exchange Declare Amount as real Declare MP_XRate as real Declare CD_XRate as real Declare EP_XRate as real

Declare JY_XRate as real Declare FF_XRate as real Declare USD as real Set MP_XRate = 9.5085 Set CD_XRate = 1.468 Set EP_XRate = 1.6433 Set JY_XRate = 104.92 Set FF_XRate = 6.2561 if(Type = 1) Set Exchange_Rate = MP_XRate Repeat Write, Input currency amount. Input, Amount Until Amount > 0 USD = Amount/MP_XRate else if(Type = 2) Set Exchange_Rate = CD_XRate Repeat Write, Input currency amount. Input, Amount Until Amount > 0 USD = Amount/CD_XRate else if(Type = 3) Set Exchange_Rate = EP_XRate Repeat Write, Input currency amount. Input, Amount Until Amount > 0 USD = Amount*EP_XRate else if(Type = 4) Set Excahnge_Rate = JY_XRate Repeat Write, Input currency amount. Input, Amount Until Amount > 0 USD = Amount/JY_XRate else if(Type = 5) Set Exchange_Rate = FF_XRate Repeat Write, Input currency amount. Input, Amount Until Amount > 0 USD = Amount/FF_XRate End if

End Calculate Exchange Output Conversion Display, Currency Type is: , Type Display, Currency Amount is: , Amount Display, Exchange rate is: , Exchange_Rate Display, Amount in US Dollars is: , USD Repeat Display, Would you like enter new currency/amount? Y = Yes, N = No, Y or N Until Reponse = Y or N End Conversion Currency Conversion Development AssignmentFlowcharts Control Flow DiagramMain Control [pic] Control Flow Diagram - Display Menu | | |[pic] | Control Flow DiagramExchange Module |[pic] | Control Flow DiagramDisplay_Results |[pic] Test Values for Currency Exchange |Input | |Type = 1 (Mexican Pesos) 9.5085 | |Amount = 10 | |Type = 2 (Canadian Dollar) 1.468 | |Amount = 10 | |Output |USD = 1.05 | |USD = 6.81 | | | |Xchange rate = |Comments |Xchange rate =

|Type = 3 (English Pound) |USD = 16.43 |Xchange rate = 1.6433 | |Amount = 10 | | | |Type = 4 (Japanese Yen) |USD = .09 |Xchange rate = 104.92 | |Amount = 10 | | | |Type = 5 (France Francs) |USD = 1.59 |Xchange rate = 6.2561 | |Amount = 10 | | | |Type = 6 (error) |What is type of currency you wish to |Error | | |enter? | | |Amount = -10 |Input your currency amount |Error | ----------------------Main Module Display Module/Exit Output Module Conversion Module Input Module Begin Display Module Quit ? Provide exit message Get Amount Module Yes

No Exchange Module Display Results End Begin Intl Currency Conversion Valid selection ? Error 4 : Invalid menu selection No Yes End Quit ? Yes Are you sure you wish to quit? Quit Verified

? Yes Enter number of currency type: 1 = M. Pesos, 2 = C.Dollar, 3 = E. Pounds, 4. J. Yen, 5 = F. Francs Call Exchange Module No Conversion Verified ? No Yes No Begin Input = 1 t= No No No No Yes Yes Yes

Yes Yes . Input = 2 Input = 4 Input = 5 Input = 1 Input = 3 Is Amt <0? Is Amt <0? Is Amt <0? Is Amt <0? Is Amt <0? Input Currency Amount Input Currency Amount Input Currency Amount Input Currency Amount Input Currency Amount

USD = Amount/MP_XRate USD = Amount/CD_XRate USD = Amount*EP_XRate USD = Amount/JY_XRate USD = Amount/FF_XRate Yes Yes Yes Yes Yes No No No No No To Display Begin Currency Type: 1-5 Amount: $ Exchange Rate: $ Amt in USD: $ Would you like to continue using Intl Currency Conversion? Is Input = N?

END Yes No To Main

You might also like