Student Needs Homework Help!

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Dec 2008
Posts: 3
Reputation: krymsyn is an unknown quantity at this point 
Solved Threads: 0
krymsyn's Avatar
krymsyn krymsyn is offline Offline
Newbie Poster

Student Needs Homework Help!

 
0
  #1
Dec 12th, 2008
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!
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,978
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 288
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: Student Needs Homework Help!

 
0
  #2
Dec 13th, 2008
The first thing you did really wrong was not putting your code between tags. It is unreadable as it is now, so helping you becomes a bit difficult...
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 3
Reputation: krymsyn is an unknown quantity at this point 
Solved Threads: 0
krymsyn's Avatar
krymsyn krymsyn is offline Offline
Newbie Poster

Re: Student Needs Homework Help!

 
0
  #3
Dec 13th, 2008
This is where I get confused and the book seems inconsistent. I'm pretty sure where I need to use quotations but but would I use brackets (for example):

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

It seems from the text that only numbers or certain variables are in brackets, however I have a hard time determining which variables to use the brackets with and when to use them (one of the things I am marked down for frequently). Thanks in advance!
"Death touched me and God caused me to live."
"I put the 'laughter' in manslaughter."
~~Krymsyn~~
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,978
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 288
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: Student Needs Homework Help!

 
0
  #4
Dec 14th, 2008
No,no,no you misunderstood me, remove those brackets immediatly!
I mean put your whole code between two markers so that the window you have pasted or typed your code in can format it the correct way.
Select the text of your code and click on the button you find on top of the window(the button is #)
And btw I believe you are in the wrong forum here...
Convert your speudocode into real code and post it in the appropriate forum if you have problems with it.
Last edited by ddanbe; Dec 14th, 2008 at 3:55 am.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 3
Reputation: krymsyn is an unknown quantity at this point 
Solved Threads: 0
krymsyn's Avatar
krymsyn krymsyn is offline Offline
Newbie Poster

Re: Student Needs Homework Help!

 
0
  #5
Dec 14th, 2008
I see, thanks so much I appreciate the help!
"Death touched me and God caused me to live."
"I put the 'laughter' in manslaughter."
~~Krymsyn~~
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC