What was most the challenging part of Library.java?
Most of the function implementations were easy enough. The main difficulty I experienced with the assignment was the management of the Code enums / return types. Since there are so many error codes it was difficult to keep track of which ones I was supposed to be handling or returning.
What was the easiest?
I found the file parsing to be easy, as it stems from simple String manipulation. Actually transforming that data into the correct state proved more difficult.
What are you most proud of?
I wrote LibraryTest.java, and managed to test the actual output of the program, (what normally goes to System.out). It took some time to figure out how to capture output using custom stream objects.
What topics from the class were the most useful for this assignment?
String manipulation was vital to this assignment. Without a good foundation in that concept, the parsing of the file would have been difficult. To the same effect, experience using the Scanner class was integral to consuming the file.
What changes / improvements would/did you make to the assignment?
Passing Code enums to the various functions is an odd pattern. Personally, I would have the functions either throw an exception, or return a Code enum to the caller, and let the caller decide what the error message should be.
If you could give yourself some advice about the assignment, what would it be?
Write the tests early, after you finish each function. The tests seem monolithic if you write them after the entire Library class has been written, (and potentially in a broken fashion). The work is much more manageable if you incrementally write them; you might even catch bugs early on.
No comments:
Post a Comment