Laboratory 5: Guidelines: Observation: How You Complete The Code Review Affects Your Grade, Not Your Colleague's: Don't
Laboratory 5: Guidelines: Observation: How You Complete The Code Review Affects Your Grade, Not Your Colleague's: Don't
For this laboratory you will have to work with one of your colleagues project. Each of you will
receive the project of a colleague during the next class (but it is not your decision whose project
it will be). In case that you were missing this class, send me an email and I will assign you
someones project.
First of all, youll have to write a code review of the received project. A template for the code
review can be found at your teachers web page. Creating a code review implies looking at the
code, trying to understand it, finding possible bugs, or unimplemented features. You will see all
the things youll have to check for in the code review document.
Observation: How you complete the code review affects your grade, not your colleagues: dont
hide the errors in their code. A code review stating that everything is complete and perfect is
usually a sign that you did not analyze the code well enough! Im not saying that there are no
perfect projects, only that they are rare.
A pdf file with your code review has to be sent by email to me until the following dates:
-
After performing the review youll have to perform some modifications in the received project.
First, youll have to change the undo functionality, so that you can undo any number of steps. In
order to do so, instead of keeping a simple list for undo, you will have to keep a list of lists.
Before starting the implementation, think about memory management, and whether you need a
deep or a shallow copy of the elements.
Second youll have to implement another filtering functionality. If there are no more fields left to
filter by (most entities have three fields, and one of them might be considered unique delete
and update are done based on its value in which case there is no use filtering by it), you can
choose one of the following options:
-
If you have numeric fields, filtering by value X can be done in the following ways:
o Keep only the entities which have exactly the value X
o Keep the entities which have the value at most X
o Keep the entities which have the value at least X
o Keep the entities which have the value between X and Y (in this case two
values are read)
If no numeric fields are in your entity (or if the numeric field is the unique one), you
will have to implement a filtering operation for a string field. Here you can keep
elements which start with a given character (given by the user) or elements which
come before/after a string given by the user (in alphabetic order). For example if your
entities contain the following values for a string field: abc, ged, des, xyz,
zzz, jkl, qde, aaa, and the user gives the string tttt, values that come before
it are: abc, ged des, jkl, qde, aaa.