1. I've heard that this very hw assignment was given out about 2yrs in 211, but someone older than I might prove me wrong. At any rate, it's no excuse for a poor hw writeup because I get deducted points when I don't do my 211 work perfectly, so why should others be held to a different standard?
2. I see that the interfaces are merely existent for organizational matter, whether it was to make files conform to a "uniform" standard (e.g. WebIndex.java must conform to Indexer.java or else there will be no order in the hw5 files) and especially in the javadocs which read much nicer when interfaces are given.
Whatever my opinion, I ask: in WebIndex.java, can I declare private data members (e.g. "private Vector v_links;") 1 level outside the scope of the constructor because apparently the interface Index.java does not allow it. What happens is that Index.java and WebIndex.java will compile ok and but at runtime, the private Vector v_links is not seen by the method addPage() which results in a "Exception in thread "main java.lang.nullPointerException" when I use v_links.addElement(new Object()); in the addPage() method.
Very annoying. Either that or I'm misusing the addElement() method of class Vector which seems unlikely -> impossible. |