Lab 04: A Debugging Mystery
Prerequisites to running the code.
Instructions: https://fa22.datastructur.es/materials/lab/lab04/
Solutions:
This lab is fairly straightforward, aims at practicing GIT & Debugging.
GIT exercise
In the first part, we pulled a buggy version of
lab01/Collatz.Commited the buggy version
.Checked out the file from the commit in lab01, to revert its state to its pre-buggy version.
A Debugging Mystery
Your company, Flik Enterprises, has released a fine software library called Flik.java that is able to determine whether two Integers are the same or not.
You receive an email from someone named “Horrible Steve” who describes a problem they’re having with your library:
Figure out whether the bug is in Horrible Steve’s code or in Flik enterprise’s library.
Solution:
After writing and running some tests, I found out that unfortunately, the bug was indeed in Flik enterprise's library. :))
Original:
Test Suite:
Solution:
Reasoning - to check object equality, you need to use equals()
Last updated