I am having a problem in one of my programs and i cant seem to get ir right. I have an array, that holds an object. I go through this array with a for loop checking if any of the slots in the array are null, if a spot is null return true, if the entire array is full, return false. Then it prints everything in the array.
The problem is, this is looped, so when it does it again, its like it was never done the first time and the entire array was set back to null and the values were never there!
Thank you for your help [ March 06, 2005: Message edited by: Sean Magee ]
I have the code on my laptop, but i try my best to replicate here.
I am having problems with two of my classes, but i think i have to throw the code out for three so you can understand my problem
Ok, so thats the code where the touble lies I think. I have a couple of other classes that I am not showing, like the talk class which mainly deal with the userinput and alos haas a boolean vairable that is assigned by the addCust method, but of course, it never returns false. The talk class also askes which bus the user would like to ride, and how many people the user would like to book, indicated by the passnum and depart integers being passed through the toBooker method in the mainstreet class. However when this JOptionPane.showMessageDialog(null,""+fullorder); talk again = new talk(); again.askToPurchase(); executes, it askes the user again which shuttle, which departure, and if you pick the same one as before,
the customer array, the order array, and the shuttle array
all have seem to be reset back to null, and did not store the original values that were set by the user.
Can you see what i am doing wrong here? [ March 06, 2005: Message edited by: Sean Magee ]