Computer Science Canada

Trucking Program

Author:  jamonathin [ Thu Apr 27, 2006 7:32 pm ]
Post subject:  Trucking Program

Hey all, this is a program I wrote for a Trucking Company - yes in Turing.

Now I was told by both wtd and Martin at the time not to do it in Turing - but I felt i was unable to learn a new language and still pull off the effectiveness that I require. So, I resorted to all-faithful.

Now there are some things wrong with it, I'll list a couple.

- You can crash it by holding down the File Menu and placing the mouse over the top left hand corner of the run window.
- Turing doesn't print in it's executable - BIG PROBLEM
- The coding is not yet encrypted
- Its Turing

Now the list can go on and on, but - oh well.

What this program does:
This program is designed to take the information from multiple trucks daily/couple day trips - to where ever they go. This information is stored with odometer readings. Now, the program must calculate how much distance (in KM and Miles) that truck traveled in each state, then save it.

After a crapload of these have been entered for each truck (oh, and the program must be able to make new trucks with specific information) a report must be put together.

The report must be able to run from ANY start date to ANY end date with a filter of:
"All Trucks"
just "Fleet 1"
just "Fleet 2"
just "a Specific Truck"

Now with that there are two specific states that are special for some reason. Kentucky and New York. A New York Report is different from any other report - because it requires different information.

So basically, this program must do everything for the user right up to almost wiping his a**, and make it user friendly. There are some examples of trucks and loads (they're not realistic) in there for you to look at.

Overall, there were endless hours of frustration put into this program, and it's not the money I cared for (measly 400) it was the experience of dealing with someone who is demanding, doesn't give a sh** what your excuses are and most of all doesn't believe in you - which is what I'll be dealing with much later on in life for shuuurrre. *sigh* . . It was a definate learning experience however.

** Note - This is not the submitted program and yes there are errors in it (i'll let you find them - but its not the calculating) so have fun . . i guess? lol **

Author:  upthescale [ Thu Apr 27, 2006 7:48 pm ]
Post subject: 

what is this program suppose to do? i dont no wut to write in...but other than that


HOLY CRAP THAT IS AMAZING

Author:  Clayton [ Thu Apr 27, 2006 8:39 pm ]
Post subject: 

upthescale have you ever bothered to read what someone has typed in their post? jamonathin has clearly explained what the program is supposed to do, make reports on various trucks and their movements etc.

Author:  Clayton [ Thu Apr 27, 2006 8:50 pm ]
Post subject: 

ok im pretty sure i found the problem you were talking about, and its with your KM->miles thing (the little box you can make an X in and the buttons) that dont quite work right, i started off with different numbers than i had when i started with (even after changing from miles to KM a couple of times) after pressing the KM and Miles buttons a couple of times something happened and the numbers changed from what they were supposed to be to some other random numbers (originally mileage was like 5000 miles in FL and then all of a sudden it was like 10000 miles in FL) idk if this was the problem you were talking about, and if it wasnt i hope it wasnt in the copy you handed them lol nice job though, however i think you should have made your own GUI class/module, it would have made it look much better, but meh, beggars cant be choosers.

Author:  jamonathin [ Fri Apr 28, 2006 9:46 am ]
Post subject: 

yeah I was too lazy to create my own GUI - even though it wouldn't be that hard.
The problem regarding KMs -> Miles (with the checkboxes) is one of them.

What happens is, the checkboxes represent the odometer readings - whether they're in KMs or Miles, and the Milage button transfers them over to divide each state. But there you can change it from KMs to Miles and vice versa.
Here's the problem that used to happen(which you caught) - if you select Odometer to be in KMs then in the Milage you change it to Miles - then rehit the Milage button, the program didn't reset it selft in the Milage portion to what is selected in the Odometer, therefore if you change the milage back to KMs - resulting in 1.609344 extra kilometers.

Good eye: + 15 Bits.

Author:  Clayton [ Fri Apr 28, 2006 5:38 pm ]
Post subject: 

thnx for the bits, i once had to make a similiar type of program (conversions between metric and imperial) and i had a similiar problem, you could just have a fcn that gives a variable a KM odometer reading, then have another for that same distance in miles, and call on either one depending on which measurement you are using and do your calculations accordingly. gj though


: