[Solved] CSCI3901 Lab2-Debugging

$25

File Name: CSCI3901_Lab2-Debugging.zip
File Size: 216.66 KB

SKU: [Solved] CSCI3901 Lab2-Debugging Category: Tag:
5/5 - (1 vote)

In this lab, you will become familiar with debuggers.

Working individually you will debug a few programs. While the defects in the programs of this lab may not be complicated, use the time to become familiar with how your debugger works before you are faced with complex code.

Do not resort to debugging in this lab using print statements.

Preparation

  • Download java, Ackermann.java, and LinkedListTest.java from Lab 2 in Brightspace

Resources

  • A debugger which allows inspecting variables, breakpoints, stack traces

Procedure

Lab steps

  1. Run HfxDonairExpress on some inputs. You do not need to check invalid input.
  2. Examine the output until you find an incorrect value.
  3. Set a breakpoint at the start of the program.
  4. Select a defect in the program.
  5. Run your program in the debugger and step through the program to identify where the defect happens in the code.
  6. Determine what could fix the defect.
  7. Implement your fix and re-test to ensure that the defect is fixed.
  8. Repeat until no defects remain.

Repeat these steps for Ackermann.java and LinkedListTest.java.

Analysis

What strategy or strategies for debugging are most effective for you?

What makes them effective?

For which conditions of the code will your strategies be effective or ineffective?

How can a debugger support your strategies?

Reporting

  1. In one file, list
    • The cause of the defects that you found.
    • The approach that let you locate the defect.
    • The approximate amount of time it took you to locate the defect.
    • The answers from the questions in the Analysis section of the lab.
  2. Generate a PDF from the document.
  3. Submit the PDF and your Java files in Brightspace in the Lab/Lab 2 section of the course page in Brightspace.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSCI3901 Lab2-Debugging
$25