Coursework 2 Marks

Student NumberCoding ConventionsTest ProgramCorrect StructureAllocate and FreeAddSubtractMultiplyDivideTotalComments
401312189101010715988% BigIntMaths is not the same as bigintmaths. Some tests crash due to memory bugs
437245185751072054% Makefile is quite badly wrong. Test program is mostly right. Comments on every line explaining what the code does, not why. No free() anywhere in the code... Looks vaguely like you were on the right track.
4458891015710100043% No (sane) Makefile. There is a test program, but it doesn't do what was asked. Missing braces after control statements, bad brace style for functions. Free function leaks the digits array. Lots of memory leaks.
4614674720222221% Uses 64-bit integers (wrongly - only actually works on 31-bit values). Does not implement a separate test program.
462694181010810715078% Bad spacing in a few places and some memory leaks.
46619910105810104057% Wrong name for test program, and missing -lm in Makefile. Big integer not an opaque type. Multiply doesn't work, but looks as if you were on the right lines.
48183110530300021% Makefile is an RTF file?!? Big int not an opaque type. Very poor style. Doesn't even compile, let alone work. Looks like you were vaguely on the right lines with addition.
482868124617310245% Test program not in separate source file. Allocation does some strange and wrong things, freeing would leak if allocation worked, no idea what it does with the current code... No idea how you think the conversion from strings to integers is meant to work. Multiplication looks like you're on vaguely the right track.
48433220910101053067% Subtract is almost right. Very clear and readable code.
48452520910101010151599% Would have been full marks if your test program had used the requested output format.
4882322010101010101515100% A few cosmetic errors, but bonus marks for supporting negative results in subtraction.
49072718101010553061% Arithmetic looks like it's almost correct, but there are some bugs with carry and with parsing long numbers.
52175518109510100062% Incorrect name for test program, big integer not an opaque type. Lots of memory bugs.
52186620109101010151195% Big integer not an opaque type. Some memory bugs.
52219615998101010576% Big integer not an opaque type. Allocation and freeing code scattered everywhere (freeBigInt() never actually called). Random indenting in places. Test code does not use specified output format.
522217151095550049% BigInt not an opaque type. Free function references memory the line immediately after freeing it! Subtraction crashes - lots of memory bugs
522540109105700041% Addition fails if second operand is larger than first. Free function not implemented. Very few comments, so I've no idea what you were thinking most of the time. Multiply might be almost right, but the code is pretty unreadable.
52278051000800023% Submitting a makefile containing -Werror when your code generates warnings is a bad idea. Big int not an opaque type, passed by value everywhere. Random indenting. Addition looks mostly correct, but crashes in some cases and generates the wrong result in others.
5228525170000013% Big int not an opaque type, and you seem to have forgotten the entire implementation...
5229875255553030% Does not compile. If you can't even copy correctly, you get very few marks (compare your header to the notes). Code looks vaguely correct, but no comments, poor layout, and no working tests.
5230151810101055101078% Some memory bugs cause crashing with largish input values on all operations.
5230305810510105457% Next time, read EXACTLY what the test program is supposed to do. Big int not an opaque type. Some random variables declared in the header. Multiplication crashes.Comments seem largely unrelated to the code ('worthless method is worthless'? This isn't 4chan.)
523204151081010715782% Division infinite loops if a % b != 0. Big int not an opaque type. Why is your length a pointer?
523206171010101010151597% Some random indenting, bug otherwise good.
52335520810101010151598% Final is not the same as bigintmaths...
52380717101010375567% Your tests were not very comprehensive - most of the numbers that I tried generated the wrong results.
52385020910101010151599% bigintmain is not bigintmaths.
524402179101010915080% 1 - 1 = ?
524753155701070044% Test program does not do what was requested. No big integer type.
52536115085700035% No working test program. Big integer structure freed correctly, but allocated wrongly. Your add implementation is basically correct - I suspect that the bugs that you see are caused by your memory problem (why did you not test with valgrind, as I told you to, it would have found this for you in about a minute?)
52591415810101010151593% Some slightly random indenting. Test program does not do what was asked.
526189188951010151085% 1200000000000000 / 12 = ?. Big integer type is not opqaue.
5274221785010915569% Lots of memory bugs. The big blob of glibc errors that you get when you try to run your code should have been a clue... No big integer type. Spacing is a bit random, but code quality is good otherwise.
52799118985101015075% Big_Integer is not opaque.
528177201075107151084% big_integer_t is not an opaque type. Lots of internal functions are exposed in the interface. Borrowing doesn't seem to work correctly in subtraction. Some bugs in division
5303791858101010151591% Please read the instructions before writing the test program! Big int type is not opaque. No doc comments on functions.
532143188101010915080% Not sure why little endian was difficult for division - my solution was little endian.
560361170608813052% Read. The. Instructions. If I have to delete 90% of your test program to make it work, this does not make me happy.No opaque type defined. Fixed-size buffers everywhere, the solution was for arbitrary-length integers, not up-to-1024-digit integers.
57554250810220027% Test program does not do what was requested. Or work at all, for that matter. No opaque type. No variable size. Incorrect indenting, poor spacing. Very poor commenting - things that would be obvious with sane variable names are commented, things that are non-obvious are not.
5824661010751053656% Your makefile is a binary?!? No opaque type. Test program looks very complicated. No comments (************* does not count as a comment). Subtract looks almost right.
58398810085557747% You did not try testing this code, did you? No opaque type. Includes headers that don't exist... Looks vaguely right, but I can't be sure without any working test code.
592680540000009% You seem to have missed the point of splitting the code into two implementation files. No comments, and I can't work out what you think you were doing.
6201921810101051071080% Looks like you have a bug that causes zeros in the middle of results to be omitted sometimes. Your code is much more complicated than it needs to be.
65217214101095615675% Lots of memory bugs. Not many comments, lots of small errors.
65234350810000023% Test program does nothing. No opaque type. Superfluous reimplementations of standard library functions. Missing implementations of... pretty much everything.