Sunday, 13 April 2014

Okay..

I guess I forgot to update the stuff yesterday, but oh my..this assignment is so stressful.

Well more like..my life is really stressful right now, so I just uh...computer science is adding to this. I thought I would be done the Mahjong by now (I like to have my assignments done in advance..). But a whole bunch 'o tests and stuff came up, so I'm here programming last minute (and I hate it).

Anyway, I did quite a bit yesterday. Here's just a few things:


  • Created the menu asking the user whether they want to use a directory from a certain text file (and for them to provide a name for it - still haven't programmed that bit, but it shouldn't be too hard). 
  • Created a menu asking the user whether they want to insert/add, delete, edit, search, print or exist the program. 
  • I have methods for the insert, delete, and search, but I'm still rather confused about them because in the notes, there were 2 versions of it - one in the tree class to test whether the tree is empty, and if it isn't, it kicks off the recursive one in the node class (that makes sense). The thing I'm confused about is how to print it in preorder because all the code is in inorder right now. 
    • I'm pretty sure it's the same thing, but it starts at the root and then goes to the left and then the right. But this is the thing that's confusing the heck out of me. 
  • My goal for now is to complete everything but the preorder because the changing to preorder is a matter of changing one or two pieces of code - ish in the recursion. 
I'll get on those other things now :P 

No comments:

Post a Comment