Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Display method
- public String dimensions(){
- // Return a string that contains the 3 dimensions of the object
- return "Depth =" + depth + "\n" +
- "Length = " + length + "\n" +
- "Width = " + width + "\n" +
- "Floor area = " + this.area() + "\n" +
- "Volume = " + this.volumn();
- } // End of method
- } // End of class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement