I am a University of Phoenix student currently enrolled in IT210 (for those of you who are familiar). I have been struggling throughout this semester...the book is hard to follow and the instructor seems more helpful then he is. :(
My final project is the Currency conversion program and this is the pseudocode I have so far:
Currency Conversion Project
*Declare variable as integer*
*Declare exchange as integer*
*Declare international rate as real*
*Declare US currency rate as real *
Execute while user wants to continue
DISPLAY MENU
Get other country Value
Convert Currency
Display Results
End loop
Print exit message
End Main Module
Display Menu
Set continue = true
While continue = true
Display "Welcome to the Currency Converter"
Display "Choose currency to convert"
Display "Currently available currency Types:"
Display "1: CAD"
Display "2: Pesos"
Display "3: Pounds"
Display "4: Yen"
Display "5: Francs"
Display "6: Exit program"
Display "Enter a selection:";
Input currency Type
If currency Type >= 1 AND currency Type <= 5 then
Set continue = false
else if currency Type = 6
Display “Currency conversion now shutting down”
continue = false
else
Display “"Error : Invalid menu selection."
continue = true
end if
end While
End Display Menu
Get International Value
Declare value as integer
Declare continue as real
Set continue = true
While continue = true
Display "Enter a currency amount: "
Input Country value
if Country value > 0 AND internationalize <= 3000000 then
continue = false
else
Display “"Error 1: Invalid currency amount"
continue = true
end if
end while
End Get Country Value
Convert Currency total
Declare rate as real
Select chosen currency type
Selection 1:
Set rate = 1.4680
Selection 2:
Set rate = 9.5085
Selection 3:
Set rate = .6085
Selection 4:
Set rate = 104,9;
Selection 5:
Set rate = 6.2561
default:
Set rate = 0.0
End Convert Currency
Display Results
Declare country as string
Declare currency as string
Choose target currency
selection CANADIAN:
country = "Canadian";
currency = "CAD";
selection MEXICAN:
country = "Mexico";
currency = "Pesos";
selection ENGLISH:
country = "England";
currency = "Pounds";
selection JAPANESE:
country = "Japan";
currency = "Yen";
selection FRENCH:
country = "French";
currency = "Francs";
default:
Country = "No country";
currency = "";
End selection
if currency <> “” then
Display “The value of “, international Value, “ “ , country Value, “ “,currency, “ is “,
us Value, “ dollars”
else
Display "Error 5: Invalid currency selection."
end if
End Output display currency results
My question is: have I gone wrong in any area of this code? If so, where? Can you explain what and why the code is incorrect? Thanks in advance!