The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly.  public class DebugBox {    private int width;    private int length;    private int height;    public  DebugBox()    {       length = 1;       width = 1;       height = 1;    }    public  DebugBox(int width, int length, height)    {       width = width;       length = length;       height = height;    }    public void showData()    {       System.out.println("Width:   + width + "  Length: " +         length + "  Height: "+ height");    }    public double getVolume()    {        double vol = length + wdth + height;       return vol;    } }

icon
Related questions
Question

The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. 

public class DebugBox
{
   private int width;
   private int length;
   private int height;
   public  DebugBox()
   {
      length = 1;
      width = 1;
      height = 1;
   }
   public  DebugBox(int width, int length, height)
   {
      width = width;
      length = length;
      height = height;
   }
   public void showData()
   {
      System.out.println("Width:   + width + "  Length: " +
        length + "  Height: "+ height");
   }
   public double getVolume()
   { 
      double vol = length + wdth + height;
      return vol;
   }
}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer