public class DebugFour3
// This class uses a FixDebugBox class to instantiate two Box objects
{
public static void main(String[] args)
{
int width = 12;
int length = 10;
int height = 8;
FixDebugBox box1 = new FixDebugBox
FixDebugBox box2 = new FixDebugBox(width, length, height);
System.out.println("The dimensions of the first box are");
box1.showData();
System.out.println("The volume of the first box is");
showVolume(box);
System.out.println("The dimensions of the first box are");
box2.showData.
System.out.println("The volume of the second box is");
showVolume(box2);
}
public static void showVolume(FixDebugBox)
{
double vol = aBox.getVolume();
System.out.println(volume);
}

}

Member Avatar for coil

First off, please put code in Code tags. Also, paste the full text of errors. That makes it easier to see what's wrong.

FixDebugBox box1 = new FixDebugBox

That's an incomplete line.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.