0

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);
}

}

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by coil
0

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.

Edited by Reverend Jim: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.