943,758 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1157
  • C++ RSS
Dec 16th, 2008
0

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

Expand Post »
Quote ...
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.
C++ Syntax (Toggle Plain Text)
  1. Currency Conversion Design
  2.  
  3.  
  4. Main module
  5.  
  6. Declare ItemName As String
  7. Declare Currency type As Real
  8.  
  9. Call Welcome message module
  10. Call Input Data module
  11. Call Perform Calculations module
  12. Call Output Results module
  13.  
  14. Write “Welcome to the currency convertor database,”
  15.  
  16. End Program
  17.  
  18. Input Data module
  19.  
  20. Write “Enter the item’s name?”
  21.  
  22. Input ItemName
  23.  
  24. Write “What is the currency type?”
  25.  
  26. Input currency dollar amount
  27.  
  28. End Input Data module
  29.  
  30. Perform Calculations module
  31.  
  32. If sourceCurrency is Dollar Then
  33. Assign sourceRate to 1.4680 dollars
  34.  
  35. ElseIf sourceCurrency is Pound Then
  36. Assign sourceRate to 1.6433 Pounds
  37.  
  38. ElseIf sourceCurrency is Yen Then
  39. Assign sourceRate to 104.9200 yen
  40.  
  41. ElseIf sourceCurrency is Francs Then
  42. Assign sourceRate to 6.2561 francs
  43.  
  44. End If
  45.  
  46. Output Results module
  47. Write “The currency is”: ItemName
Reputation Points: 10
Solved Threads: 0
Newbie Poster
clb8372 is offline Offline
6 posts
since Dec 2008
Dec 16th, 2008
0

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

C++ Syntax (Toggle Plain Text)
  1. I had forgot to show the currency conversion I am using:[LIST]<ul><li>Canadian dollars (rate: 1 U.S. dollar = 1.4680 Canadian dollars)</li>
  2. </ul><ul><li>Mexican pesos (rate: 1 U.S. dollar = 9.5085 pesos)</li>
  3. </ul><ul><li>English pounds (rate: 1.6433 U.S. dollars = 1 pound)</li>
  4. </ul><ul><li>Japanese yen (rate: 1 U.S. dollar = 104.9200 yen)</li>
  5. </ul><ul><li>French francs (rate: 1 U.S. dollar = 6.2561 francs)</li>
  6. </ul>
Reputation Points: 10
Solved Threads: 0
Newbie Poster
clb8372 is offline Offline
6 posts
since Dec 2008
Dec 16th, 2008
0

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

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
Reputation Points: 33
Solved Threads: 18
Junior Poster in Training
mahlerfive is offline Offline
77 posts
since Aug 2008
Dec 16th, 2008
0

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

C++ Syntax (Toggle Plain Text)
  1. 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
  2. of what they are being used for" What does he mean by this statement?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
clb8372 is offline Offline
6 posts
since Dec 2008
Dec 16th, 2008
0

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

Click to Expand / Collapse  Quote originally posted by clb8372 ...
C++ Syntax (Toggle Plain Text)
  1. 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
  2. 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.
Featured Poster
Reputation Points: 2614
Solved Threads: 687
Posting Expert
VernonDozier is offline Offline
5,373 posts
since Jan 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Help asap
Next Thread in C++ Forum Timeline: Binary tree coding





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC