Aotearoa Accommodation Rewrite
Thursday, 20 February 2014
Little mini rant:
Out of all the sorts, the quick sort is (obviously) the quickest, given its' name. But that's not the only reason (it would be cool if it was - just say QUICKSORT and it becomes the quickest). The REASON it's a quick sort is because it uses recursion which always quick (and really confusing). And then there are a bunch of other sorts that don't use recursion like insertion, selection, and bubble sort. The insertion sort, I have a feeling is the one of the slower sort seeing as though it compares every single value, and then checks to see whether it is greater or less than, and then moves them accordingly. For example, if you were searching fro something that is alphabetical, the insertion sort would look at a certain index, say '1', and check whether the current index or the one above it is greater. If it is greater, they are flipped; if not, they remain the same, and we test it on another value. One of the problems with this method is that even though something is at the top of the list and in the right space, the program still has to check it unlike in selection sort or bubble sort, where the minute something is moved, it's officially moved. The selection sort, makes this a lot more convenient, where instead of checking one next to the other, it finds the largest item in the list and exchanges that with the top (cause it would be on the top either way). And then, it switches every one that needs to be switched in the remaining list. The bubble sort, which, I think is the easiest to memorize does this in a different way. The bubble sort goes through the list exchanging the larger values to the right side and keeps going until the largest value is at the top. And it continues this until the entire list is sorted when nothing else has to be sorted, it's done.
Searching
Sigh..I'm definitely not getting anything done todaay or like..any time soon. Bloody cough never seems to stop!
Well beside the point, I got a bit done. And that's the uh..well, a bit of the sorting bit. I'm just testing it now.
Well beside the point, I got a bit done. And that's the uh..well, a bit of the sorting bit. I'm just testing it now.
So hmm, yeah. That's what pops up. Okay, time for cough syrup or finding something to stop the cough. Bai.
Wednesday, 19 February 2014
Sorting Done
So the sorting bit is done. I'm going to get the user to entire it mm/dd/yyyy though. It'll make it a lot easier to sort so instead of August 01 it would be 08/01/2014 or something like that. That way, Java will make it a lot easier to see and the program would be a lot more user friendly.
Last night
I didn't have a chance to post what I did last night, last night. So here goes:
I ended up fixing the whole array thing, in which when you add an entry, it shows up in the table. So that's all done with.
Although I edited this morning because I felt like that code wasn't something that I could use...instead, I've created a copy of an array and then made them equal.
But unfortunately, they are showing the object positions rather than the value inside the array now..so I'm really confused.
Oh. I should have made the for loop thing with boundaries of the shorter array rather than the longer one. Okay, that totally makes sense now. And I'm done the adding entry bit now..
Onto the searching and sorting!
I ended up fixing the whole array thing, in which when you add an entry, it shows up in the table. So that's all done with.
Although I edited this morning because I felt like that code wasn't something that I could use...instead, I've created a copy of an array and then made them equal.
But unfortunately, they are showing the object positions rather than the value inside the array now..so I'm really confused.
Oh. I should have made the for loop thing with boundaries of the shorter array rather than the longer one. Okay, that totally makes sense now. And I'm done the adding entry bit now..
Onto the searching and sorting!
Tuesday, 18 February 2014
Yay!
So from work that I did this morning and stuff that I've just done, this is what it looks like when you "search" for something (It doesn't actually search yet).
I've run into a dilemma, which I'll have to ask Ryk about. UGH.
Confuzzle
Running into a pretty big problem because the table is being created in a separate class. But if I have the addEntry thing in the main class, then the other class will not be able to access it.
One thing I can do is create a temporary object item, and then merge them at the end and print the updated thing into the file.
Or, I can just add it into the file and get the program to read it in again. It's going to take a heck lot of memory though.
One thing I can do is create a temporary object item, and then merge them at the end and print the updated thing into the file.
Or, I can just add it into the file and get the program to read it in again. It's going to take a heck lot of memory though.
Sunday, 16 February 2014
DJFLSKDJVDSK
Okay, I keep running into errors - so I'm going to revert it back to what it was the last time, and ask Ryk if i can just add search and call it a day. Creating my own sorting is just such a headache.
Subscribe to:
Comments (Atom)




