Labs

  1. Open Debugging/com.example.debugging.labs.BuggyProgram.

The expected output of this class is

make=Bravado, model=Banshee, color=blue, numberOfWheels=4, purchasePrice=74000.0
make=Dundreary, model=Landstalker, color=yellow, numberOfWheels=4, purchasePrice=63999.99
make=Dundreary, model=Admiral, color=green, numberOfWheels=4, purchasePrice=23500.0
make=Declasse, model=Sabre, color=red, numberOfWheels=4, purchasePrice=31000.0
make=Maibatsu, model=Mule, color=white, numberOfWheels=4, purchasePrice=57300.0

You must examine the class and find its bugs. * Do not just fix the code. * Do not put any System.out.println() statements. * Add breakpoints and step through the code to find the bug. * Start with a breakpoint in main, and then step into methods. * Add additional breakpoints in methods as you move through code. * Look at variable values in the Variables tab.


Prev -- Up