I need feed back on how to correct my pseudo code....Can someone help me please?

Dec 16 2008 7:12 PM
I was given feed back from my instructor and I am not sure how to empliment these changes. Here is the feedback:
  • In your MAIN module you call a WELCOME MESSAGE module but you don't have one defined in the code.
  • Why do you have a variable named ItemName? Variable names should be descriptive
    of what the are being used for.
  • In your INPUT module you first ask for the items name but not for the name of
    the currency you want to convert. You then ask for the currency type but input the currency amount.
  • Your PERFORM CALCULATIONS module does not perform any calculations. You do set the sourcerate variable to different rates (but only for 4 of the specified currencies) You never perform the currency conversion.
Currency conversion
  • Canadian dollars rate: 1 U.S. dollar = 1.4680 dollars)
  • Mexican pesos (rate: 1 U.S. dollar = 9.5085 pesos)
  • English pounds (rate: 1.6433 U.S. dollars = 1 pound)
  • Japanese yen (rate: 1 U.S. dollar = 104.9200 yen)
  • French francs (rate: 1 U.S. dollar = 6.2561 francs)

Currency Conversion Design


Main module

Declare ItemName As String
Declare Currency type As Real

Call Welcome message module
Call Input Data module
Call Perform Calculations module
Call Output Results module

Write “Welcome to the currency convertor database,”

End Program

Input Data module

Write “Enter the item’s name?”

Input ItemName

Write “What is the currency type?”

Input currency dollar amount

End Input Data module

Perform Calculations module

If sourceCurrency is Dollar Then
Assign sourceRate to 1.4680 dollars

ElseIf sourceCurrency is Pound Then
Assign sourceRate to 1.6433 Pounds

ElseIf sourceCurrency is Yen Then
Assign sourceRate to 104.9200 yen

ElseIf sourceCurrency is Francs Then
Assign sourceRate to 6.2561 francs

End If

Output Results module
Write “The currency is”: ItemName

Answers (1)