It 210 Final Project

Only available on StudyMode
  • Download(s) : 418
  • Published : April 7, 2013
Open Document
Text Preview
FINAL PROJECT
Peter Walkoviak
IT 210
SEPTEMBER 10 2011
CASANDRA RICHARDSON

FINAL PROJECT
Application level requirements
INPUT| PROCESS| OUTPUT|
Main options| Display main| Main options|
Main choose currency to be converted| Get users input| Display currency rate| Input total amount of currency to be converted| Calculate foreign currency into US dollars| Display total amount of currency in US dollars| Enter another currency amount or quit program| Return user to menu| Another conversion or quit program|

Display results module
Display module
Foreign currency module
Convert currency module
Main module

Currency Conversion Design

Main Module

Declare CurrencyType as string
Declare CurrencyTotal as integer
Declare USTotal as integer
Declare Canadian dollars, Mexican pesos, English pounds, Japanese yen, French francs as real Declare Response as string
Declare Answer1 as string
Declare Answer2 as string
Declare Answer3 as string
Declare Answer4 as string
Declare Answer5 as string
Declare Answer6 as string

Get user input
Determine foreign currency type

Determine foreign currency total

Convert foreign currency to U.S. dollars

Divide currency total by rate to find U.S. total

Display equivalent U.S. dollar amount

Return user to menu

End Main Module

Display Menu Module

Repeat
Write, “Welcome to the currency converter.”
Write, “Select international currency type: Canadian dollars, Mexican pesos, English pounds, Japanese yen, French francs.” Input CurrencyType

Write, “Is selected currency type valid? (Yes or No)” Input Answer1

If (Answer1 = No) Then
Write, “Error 4: Invalid menu selection”
Until Answer1 = “Yes”

If (Answer1 = Yes) Then
Write, “ Would you like to quit currency converter? (Yes or No)” Input Answer2

If (Answer2 = Yes) Then
Write, “Are you sure you want exit currency converter? (Yes or No)” Input Answer3
Until Answer3 = “Yes”

If (Answer2 = No) Then
Write, ““Is selected currency correct and ready for conversion? (Yes or No)” Input Answer4
Until Answer4 = “Yes”
End if

End Display Menu Module

Get Int Value Module

Write, “What is the total amount of currency?”
Input CurrencyTotal

Write, “Is the input legal? (Yes or No)”
Input Answer5

If (Answer5 = No) Then
Write, “Error 3: Invalid legal input”
Until Answer5 = “Yes”
End if

If (Answer5 = Yes) Then
Write, “ Is input valid? (Yes or No)”
Input Answer6

If (Answer6 = No) Then
Write, “Error 2: invalid input”
Until Answer6 = “Yes”
End if

End Get Int Value Module

Conversion and Results Module

Repeat
If (CurrencyType = Canadian dollars) Then
CurrencyTotal / 1.468 = USTotal
End if
Write, “CurrencyTotal Canadian dollars = $ USTotal U.S. Dollars.”

If (CurrencyType = Mexican pesos) Then
CurrencyTotal / 9.5085 = USTotal
End if
Write, “CurrencyTotal Mexican pesos = $ USTotal U.S. Dollars.”

If (CurrencyType = English pounds) Then
CurrencyTotal * .608531613 = USTotal
End if
Write, “CurrencyTotal English pounds = $ USTotal U.S. Dollars.”

If (CurrencyType = Japanese yen) Then
CurrencyTotal / 104.92 = USTotal
End if
Write, “CurrencyTotal Japanese yen = $ USTotal U.S. Dollars.”

If (CurrencyType = French francs) Then
CurrencyTotal / 6.2561 = USTotal
End if
Write, “CurrencyTotal French francs = $ USTotal U.S. Dollars.” Display equivalent USTotal

If (CurrencyType <> Canadian dollars, Mexican pesos, English pounds, Japanese yen, French francs) Then
Write, “ Additional countries unavailable, Rate = 0.0”
Write, “ Does currency = null? (Yes or No)”
Input Answer7

If (Answer7 = Yes) Then
Write, “ Error 5: Invalid currency type”
End if

If (Answer7 = No) Then
Print Nation, CurrencyType, CurrencyTotal, USTotal
End if

Write, “ Would you like to exit the currency...
tracking img