We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

pseudocode clarification

elusivesoul
elusivesoul asked
on
Medium Priority
597 Views
Last Modified: 2010-05-18
Hi guys, I'm no good at pseudocode. But I want to confirm with an expert, how would you professionally
write pseudocode from the below information.

-----
Calculate Postage based on the following..

1. user will enter the weight of the item being posted in a text box
2. user will select the service required (there must be two options air and
surface mail)
3. user then will press calculate button that will display the cost.

----------

Yes, i know it sounds simple, but call me paranoid. Have to make sure its to the boss's liking.
Thankyou in advance
Comment
Watch Question

Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
thanks mlmcc. Well, i was searching through our shared folder at work, and i came across this one from last year. How would u tailor it to the below one?.

ihcar            range                   age
barina       city                       17
skyline       country               21+
mitso

If they choose
Barina
Car val=1
If they choose skyline
Car val=2
If they choose mitso
Car val=3


If they choose city
Range val= 1
If they choose country
Range val=2

If age=17
Age val=3
If  age val=1


Total=car val + range val+ age val+ base rate

Commented:
You need to know the surface and air formulas before you can write the proper pseudocode.
In other words, if a user enters a weight and selects surface, how do we work out the cost? and if they select a wieght and select air, how do we work out that cost?
If you tell us that we'll be able to give you proper pseudocode :)
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
thanks guys, your help has been much appreciated..

Commented:
Hi elusivesoul,

1-
make a textbox, call it Weight,
2-
make either
a Combobox, call it AirSurface, with List values as Air; Surface (I will use this option for this example).
OR
2 check boxes in an option group, call them Air and give it an option value 1, and Surface and give it an option value 2
3-
make a Command button, call it Command1
4-
Make another txt box, call it  TotalPrice.
5-
click on the properties of the command1 button, go to the On Click, and place the following in the code:

If me!AirSurface="Air" then
 TotalPrice=Weight * 1.2 ' assuming 1.2 is for Air mail
elseIf me!AirSurface="Surface" then
 TotalPrice=Weight * .8 ' assuming .8 is for Air mail
end if


Hope this helps

jaffer
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
Glad I could help

mlmcc
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.