# Thread: Need help in designing Shipping Company!

1. ## Need help in designing Shipping Company!

For my computer science class, I am planning to design a shipping company program which calculates the rates of different types(ground, air, etc). However, i would also like the rates to vary from place to place (Origin to Destination) and height and weight being a factor. How would I go about doing this? My friend mentined having a graph function or something for the zip codes (origin and destination)

2. > How would I go about doing this?

By writing some code and posting it here so that we can tell you what's wrong.

3. before you even think about writing code you should solve the problem, or at least derive the algorhythm you are going to use using nothing but your brain and a pen(cil) and paper.

costToShip = routeFactor*distanceFactor*heightFactor*weightFact or;

routeFactor could be \$2/mile if by air or \$1/mile if by land, etc.

distance factor may be \$.1/mile for first 100 mile, then \$.075/mile for next 900 mile and \$.05/mile beyond 1000 miles

etc. Once you have done somehting like this you can put it into code much easier.