xViolatorx
01-21-2009, 11:54 AM
Ok all,
Alice 2.0
I am trying to create a program for class using the code I will provide below. I am having trouble getting started. If someone would assist with some step by step to get me started,
I need to make a program that will help you decide where to go for vacation based on how much money you saved and how much vacation time you have. Those 2 pieces of info will be input but the user. This needs to run until told to stop. Below is what I have writen out in pseudo-code. Remember I am a beginner. Thanks in advance!! I left justified to try to make it a bit easier to read, it was spread out all over.
start
num moneySaved
num vacationTime
string destinations
string DEST1 = “Europe”
string DEST2 = “United Kingdom”
string DEST3 = “South America”
string DEST4 = “Caribbean”
string DEST5 = “Orlando”
string DEST1 = “Home”
RANGE1 = 1000
RANGE2 = 2000
RANGE3 = 3000
RANGE4 = 7
RANGE5 = 21
get moneySaved, vacationTime
while not eof
if moneySaved >= RANGE3 and vacationTime > RANGE5 then
destination = DEST1, DEST2, DEST3, DEST4, DEST5, DEST6
else
if moneySaved < RANGE3 and vacationTime > RANGE5 then
destination = DEST2, DEST4, DEST5, DEST6
else
If moneySaved < RANGE2 and vacationTime > RANGE5 then
destination = DEST5, DEST6
else
if moneySaved < RANGE1 and vacationTime > RANGE5 then
destination = DEST6
else
if moneySaved >= RANGE3 and vacationTime < RANGE5 then
destination = DEST3, DEST4, DEST5, DEST6
else
if moneySaved < RANGE3 and vacationTime < RANGE5 then
destination = DEST4, DEST5, DEST6
else
If moneySaved < RANGE2 and vacationTime < RANGE5 then
destination = DEST5, DEST6
else
if moneySaved < RANGE1 and vacationTime < RANGE5 then
destination = DEST6
else
if moneySaved >= RANGE3 and vacationTime < RANGE4 then
destination = DEST5, DEST6
else
if moneySaved < RANGE3 and vacationTime < RANGE4 then
destination = DEST5, DEST6
else
If moneySaved < RANGE2 and vacationTime < RANGE4 then
destination = DEST5, DEST6
else
if moneySaved < RANGE1 and vacationTime < RANGE4 then
destination = DEST6
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
print “Congratulations, based on the money you have saved” , moneySaved
print “and the vacation days you have” , vacationTime
print “Your vacation Destination choices are” , destination
endwhile
stop
Alice 2.0
I am trying to create a program for class using the code I will provide below. I am having trouble getting started. If someone would assist with some step by step to get me started,
I need to make a program that will help you decide where to go for vacation based on how much money you saved and how much vacation time you have. Those 2 pieces of info will be input but the user. This needs to run until told to stop. Below is what I have writen out in pseudo-code. Remember I am a beginner. Thanks in advance!! I left justified to try to make it a bit easier to read, it was spread out all over.
start
num moneySaved
num vacationTime
string destinations
string DEST1 = “Europe”
string DEST2 = “United Kingdom”
string DEST3 = “South America”
string DEST4 = “Caribbean”
string DEST5 = “Orlando”
string DEST1 = “Home”
RANGE1 = 1000
RANGE2 = 2000
RANGE3 = 3000
RANGE4 = 7
RANGE5 = 21
get moneySaved, vacationTime
while not eof
if moneySaved >= RANGE3 and vacationTime > RANGE5 then
destination = DEST1, DEST2, DEST3, DEST4, DEST5, DEST6
else
if moneySaved < RANGE3 and vacationTime > RANGE5 then
destination = DEST2, DEST4, DEST5, DEST6
else
If moneySaved < RANGE2 and vacationTime > RANGE5 then
destination = DEST5, DEST6
else
if moneySaved < RANGE1 and vacationTime > RANGE5 then
destination = DEST6
else
if moneySaved >= RANGE3 and vacationTime < RANGE5 then
destination = DEST3, DEST4, DEST5, DEST6
else
if moneySaved < RANGE3 and vacationTime < RANGE5 then
destination = DEST4, DEST5, DEST6
else
If moneySaved < RANGE2 and vacationTime < RANGE5 then
destination = DEST5, DEST6
else
if moneySaved < RANGE1 and vacationTime < RANGE5 then
destination = DEST6
else
if moneySaved >= RANGE3 and vacationTime < RANGE4 then
destination = DEST5, DEST6
else
if moneySaved < RANGE3 and vacationTime < RANGE4 then
destination = DEST5, DEST6
else
If moneySaved < RANGE2 and vacationTime < RANGE4 then
destination = DEST5, DEST6
else
if moneySaved < RANGE1 and vacationTime < RANGE4 then
destination = DEST6
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
print “Congratulations, based on the money you have saved” , moneySaved
print “and the vacation days you have” , vacationTime
print “Your vacation Destination choices are” , destination
endwhile
stop