-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDebugBox.java
More file actions
28 lines (28 loc) · 577 Bytes
/
DebugBox.java
File metadata and controls
28 lines (28 loc) · 577 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public class DebugBox
{
private int width;
private int length;
private int height;
private FixDebugBox()
{
length = 1;
width = 1;
height = 1;
}
public DebugBox(int width, int length, int 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 - width - height;
return vol;
}
}