CS112 B1
LAB 02- Debugging in Eclipse and Linked List

Objectives

  1. Familiar with the debugging mechanism in Eclipse
  2. Write programs to manipulate linked list


Preamble

One purpose of this laboratory is to get you be familar with the Eclipse Debugging System, in which you can run your program step by step and watch the intermediate results. The other purpose is to review some concepts of linked list taught in class and program with it.


Debugging your program in Eclipse

We will first review some concepts of array in Java and implement some functions to manipulate arrays. We then show how the Eclipse debugging system can help you identify potential bugs in your code and fix it.

Code: TestArray.java


Tasks

  • Download code: TestList.java
  • Write code to provide concrete implementation for each method
  • In the main() method, provide some test cases to demonstrate that your implementation is correct

 


Submission

  • Upload your code to csa machine if you are working in Windows
  • Under csa (csa2, csa3), make a directory name "Lab02/" and put your code under it
  • gsubmit your code to cs112b1
  • You must submit a working implementation for evaluation purpose. If you can not finish it in the lab, please submit it before the next lab.

Extra questions

  • Is your code efficient enough? Especially for computing the length of the list?
  • If not, how could you make some changes to the code so that the length of the list can be computed in constant time?
  • You may briefly answer the above questions as comments in the TestList.java
  • Verify your ideas by writing some code

CS112b1