C S 314 Midterm: Spring_2016_e1_GradingCrit_And_Solutions

18 views5 pages
31 Jan 2019
School
Course
Professor

Document Summary

Cs314 spring 2016 exam 1 solution and grading criteria. Aiobe - array index out of bounds exception may occur. Not certain code works, but, can"t prove otherwise. Gacky or gack - code very hard to understand even though it works. (solution is not elegant. ) Violated restrictions or made incorrect assumption: answer as shown or -1 unless question allows partial credit. The only algorithmic difficulty was keeping the three different indices in this. container, other. container, and result. container separate and correct. A lot of students used method that were not allowed. The question said no other methods from genericlist could be used unless you implemented them yourself as a part of your answer. Use methods not allowed by method such as add. Altering one of the two calling objects. Confusing indices in this, other and/or result int start, int stop) { Suggested solution: public genericlist getdualsublist(genericlist other, final int new_size = this. size + other. size();