I was given feed back from my instructor and I am not sure how to implement these changes. Here is the feedback:

  • In you 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 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

Recommended Answers

All 4 Replies

I had forgot to show the currency conversion I am using:
[LIST]
[LIST]Canadian dollars 	(rate: 1 U.S. dollar = 1.4680 Canadian dollars)[/LIST]
[LIST]Mexican pesos 	(rate: 1 U.S. dollar = 9.5085 pesos)[/LIST]
[LIST]English pounds 	(rate: 1.6433 U.S. dollars = 1 pound)[/LIST]
[LIST]Japanese yen 	(rate: 1 U.S. dollar = 104.9200 yen)[/LIST]
[LIST]French francs 	(rate: 1 U.S. dollar =  6.2561 francs)[/LIST]

Your instructor's feedback is extremely straight forward...
Also he did miss some things:
- The US dollar to English pound conversion in your code is incorrect, take a closer look at the conversion list to see why..
- Your output module only outputs the currency type... are you sure that's all you're supposed to output?
- You do not end the output module in pseudocode

I understand that my instructors feed back is straight forward, but I am new to creating pseudo codes and I am just not sure how the corrections are suppose to look, for example "Why do you have a variable named ItemName? Variable names should be descriptive
of what they are being used for" What does he mean by this statement?
I understand that my instructors feed back is straight forward, but I am new to creating pseudo codes and I am just not sure how the corrections are suppose to look, for example "Why do you have a variable named ItemName? Variable names should be descriptive
of what they are being used for" What does he mean by this statement?

Maybe he doesn't like the word "item". What types of items are there? If they're all cars, maybe he'd like carName better or something.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.