United States Dollar and Control Flow Diagram

Only available on StudyMode
  • Download(s) : 29
  • Published : January 21, 2013
Open Document
Text Preview
Application-Level Requirements List

1. Value of Dollar

2. Value of comparing currency

3. Calculation of dollar value against subject currency value

4. Display results

Input-Process-Output Chart

Complete the following input-process-output chart for the application using a structured programming approach.

Input| Process| Output|
Dollar Value| get| Real number|
Florien currency| get| Real number|
Calculate difference | Divide| Decimal|
Display results| get| Value|
End| | |

Hierarchy Chart

Complete a hierarchy chart for the application by typing into the textboxes below.

Main Module
Main Module

Display Results
Display Results
Calculate
Calculate
Foreign currency
Foreign currency
Dollar
Dollar

Currency Conversion Development Assignment—Flowcharts

Control Flow Diagram—Main Control

-------------------------------------------------
Begin
Is Dollar < or >

Quit
?
Display
Results

Is Foreign currency <or>

Yes
No
Calculate

Show difference

End
Begin
Is Dollar < or >

Quit
?
Display
Results

Is Foreign currency <or>

Yes
No
Calculate

Show difference

End

-------------------------------------------------

Control Flow Diagram—Display Menu

Begin
Enter currency name

Valid
selection
?
Error
4
:
Invalid
menu selection
No
Yes
End
Quit
?
Yes
Invaild

Quit
Verified
?

Yes
Enter currency amout

Display results

No
Conversion
Verified
?
No
Yes

No
Begin
Enter currency name

Valid
selection
?
Error
4
:
Invalid
menu selection
No
Yes
End
Quit
?
Yes
Invaild

Quit
Verified
?

Yes
Enter currency amout

Display results

No
Conversion
Verified
?
No
Yes

No
|

Control Flow Diagram—Get_Int_Value

invalid
invalid
Invalid

Invalid

Get value

Get value

Get Nmae
Get Nmae
|

Control Flow Diagram—Convert Currency

EU
EU
Jap
Jap
Mex

Mex

Begin
Canadian
?
Rate = 1.4680

English
?

No
No
No
No
No

Yes
Yes
Yes
Yes
Yes
Rate = 9.5085

Rate = 1.6433

Rtae = 104.9200

Rate
=
French Rate
Rate
=
0
.
0
US Value
=
Rate*Int_Value

End

Begin
Canadian
?
Rate = 1.4680

English
?

No
No
No
No
No

Yes
Yes
Yes
Yes
Yes
Rate = 9.5085

Rate = 1.6433

Rtae = 104.9200

Rate
=
French Rate
Rate
=
0
.
0
US Value
=
Rate*Int_Value

End

|

Control Flow Diagram—Display_Results

Nation = Japanese

Nation = Japanese

Nation= English

Nation= English

1.6433

1.6433

Add text here

Add text here

Nation = EU

Nation = EU

Nation=Mex

Nation=Mex

104.9200

104.9200

9.5085

9.5085

1.4680
1.4680
|

Pseudocode

1. Declare currencyname[99] as string
2. Declare USDvalue [99]as Float
3. Declare Forienvalue[99] as Float
4. Declare index[99] as Integer
5. Set Index =0
6. Declare Number_of_currecny as integer
7. Call (“Canadian dollars”,1.0,1.468);
8. Call (“Mexican pesos”,1.0,9.5085);
9. Call (“English pounds”,1.0,1.6433);
10. Call (Japanese Yen”,1.0,104.92);
11. Call (“EU Euro”,1.0,0.76);
12. Write “select one;”
13. Write “ “
14. For (Index =1; Index<=Number_of_Currencies; Index++) 15. Write Index”.”
16. Currency_name [index]
17. End for
18. Write “ “
19. Write “enter number for currency type”
20. Input Index
21. Write “how many”
22. Currency_name [index]
23. Declare “do you want to convert to dollars”
24. Input convert
25. Set Dollars =
26. USDvalue [index]*convert/foreignVal [index]
27. End if
28. End program
29. Subprogram (Currency_name, USDVal,...
tracking img