Thursday, November 25, 2010

Which method you choose?

  In the fwtext class, you can choose one method to implement. So, which method you choose, 2D array, dynamic array or linked list?
  For 2D array, it is the most easy way to start. However, it may be very hard to debug.The reason is the coding may large. For any small modification, you need to create a temp array; then copy the orginal array to temp; then modify it; and finally copy back. So, I can image there is a lot of nested looping. And typing is time-consuming. And debugging is more time-consuming.
  For dynamic array, if you don't know the pointer very well. The dynamic array is the hell. I am in this situaiton.
  For linked list, it is tricky because everything you need is done by Fardad's strque class. You don't need to know how it builds, updates, goes forward, goes back, inserts and deletes. You just need to use it. Once you know English, you can manage it. You don't need know the detail, you just use the function. That is also one of the strengthes of OOP.
------------------------------------------Separated line----------------------------------------------------------
  But so unfortunately, our group choose linked list at first. But today we swtich to dynamic array. That killes me. I hope I can force them switch back.
 

No comments:

Post a Comment