@@ -290,11 +290,36 @@ \section*{Implementation and Testing of a Doubly Linked Data Structure}
290290learn more about equivalence testing, please review the content in Section 3.5
291291of the textbook. Taking into consideration that the \mainprogram {} employs
292292header and trailer sentinels, your \program {equals} method should determine if
293- two instances contain the same data values. For inspiration, you can see a full
294- example of an \program {equals} method for the \program {SinglyLinkedList} by
295- looking at the source code for the most recent laboratory assignment. Make sure
293+ two instances contain the same data values. For inspiration, refer to the
294+ example of the \program {equals} method for the \program {SinglyLinkedList}, as
295+ provided in the source code for the most recent laboratory assignment. Make sure
296296that your \program {equals} does not call a method on a \program {null} object!
297297
298+ \begin {verbatim }
299+ public boolean equals(Object list) {
300+ if (list == null) {
301+ return false;
302+ }
303+ if (getClass() != list.getClass()) {
304+ return false;
305+ }
306+ SinglyLinkedList<?> other = (SinglyLinkedList)list;
307+ if (size != other.size) {
308+ return false;
309+ }
310+ Node<?> walkA = head;
311+ Node<?> walkB = other.head;
312+ while (walkA != null) {
313+ if (!walkA.getElement().equals(walkB.getElement())) {
314+ return false;
315+ }
316+ walkA = walkA.getNext();
317+ walkB = walkB.getNext();
318+ }
319+ return true;
320+ }
321+ \end {verbatim }
322+
298323% Remember, if you want to \step{build} your program you can type the command
299324% \gradlebuild{} in your terminal, thereby causing the Java compiler to check your
300325% program for errors and get it ready to run. If you notice that some of the test
@@ -373,26 +398,26 @@ \section*{Evaluation of Your Practical Assignment}
373398GitHub, you will privately received a grade on this assignment and feedback on
374399your submitted deliverables. Your grade for the assignment will be a function of
375400the whether or not it was submitted in a timely fashion and if your program
376- received a green \checkmark {} indicating that it met all of the requirements.
377- Other factors will also influence your final grade on the assignment. In
378- addition to studying the efficiency and effectiveness of your Java source code,
379- the instructor will also evaluate the accuracy of the technical writing in your
380- source code's comments. If your submission receives a red \naughtmark {}, the
381- instructor will reduce your grade for the assignment while still considering the
382- regularity with which you committed to your GitHub repository and the overall
383- quality of your partially completed work. Please see the instructor if you have
384- questions about the evaluation of this practical assignment.
385-
386- \section* {Adhering to the Honor Code }
387-
388- In adherence to the Honor Code, students should complete this assignment on an
389- individual basis. While it is appropriate for students in this class to have
390- high-level conversations about the assignment, it is necessary to distinguish
391- carefully between the student who discusses the principles underlying a problem
392- with others and the student who produces assignments that are identical to, or
393- merely variations on, someone else's work. Deliverables (e.g., Java source code
394- or Markdown-based technical writing) that are nearly identical to the work of
395- others will be taken as evidence of violating the \mbox {Honor Code}. Please see
396- the course instructor if you have questions about this policy.
401+ received a green \checkmark {} indicating that it met all of the baseline
402+ requirements checked by GatorGrader.
403+ %
404+ Please remember to read your GitHub repository's \program {README.md} file for a
405+ description of the completion grade that you will receive for this practical
406+ assignment.
407+ %
408+ You can talk with the instructor if you have questions about the evaluation of
409+ this practical assignment.
410+
411+ % \section*{Adhering to the Honor Code}
412+
413+ % In adherence to the Honor Code, students should complete this assignment on an
414+ % individual basis. While it is appropriate for students in this class to have
415+ % high-level conversations about the assignment, it is necessary to distinguish
416+ % carefully between the student who discusses the principles underlying a problem
417+ % with others and the student who produces assignments that are identical to, or
418+ % merely variations on, someone else's work. Deliverables (e.g., Java source code
419+ % or Markdown-based technical writing) that are nearly identical to the work of
420+ % others will be taken as evidence of violating the \mbox{Honor Code}. Please see
421+ % the course instructor if you have questions about this policy.
397422
398423\end {document }
0 commit comments