Hello all,
Not posted here before, but I'm currently doing the last 10% of my Bodgitt & Scarper assignment implementation. Got a few niggling worries around automatic failure, and I wondered whether anyone (ideally someone who has submitted an assignment and got the result) has got any pointers on these...
1. In my database file, contrary to what the spec says, none of the field values are null-terminated. They're all padded with spaces. That is, where a field is 10 characters wide, a 3 character value such as will be represented as ('foo', followed by 7 space characters). According to the spec, it should be 'foo\0\0\0\0\0\0\0\0\0\0' (or 'foo\0' followed by 6 arbitary characters), as \0 is the ASCII NUL character.
I've developed by database file parsing code to the letter of the spec, and as a result, in the above case, my database layer will return (i.e. with the 7 spaces). In turn, as the spec requires that if the user restricts their search by name or location, the match must be exact. So if my assessor types in 'foo' as the name, it won't match .
I'm considering having a popup if zero results are found specifying that 'foo' does not match 'foo ' to try to address this, but I'm still somewhat affeared...
2. Sounds trivial, but the spec states that all classes should be javadoc'd - does this include DBMain.java (i.e. the database interface provided in the assignment spec)? I'm worried that if my DBMain.java isn't a copy-paste from my assignment, I might get auto-failed. On the other hand, I can also imagine their auto-fail script failing me if I don't have it javadoc'd.
Finally, not something I'd imagine I'd be autofailed over, but something potentially 'controversial' I've done - just wondering if I'm the first to do this...
DBMain, the database interface provided with the assignment, is just horrible for all sorts of reasons. It also doesn't tally well with the spec, as it offers field matching on a 'starts with' basis, where the spec requires field matching on an 'equals' basis. Because of this, I've opted to make my Data class implement two interfaces: DBMain, and my own database access interface, Table. While all DBMain methods work and have been tested, the application itself interfaces with the class using the Table interface and its methods. Under the bonnet, most of the logic implementing the DBMain and Table methods is the same, so there's little duplication as a result. Thoughts?