Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. // Display method
  2. public String dimensions(){
  3. // Return a string that contains the 3 dimensions of the object
  4. return "Depth =" + depth + "\n" +
  5. "Length = " + length + "\n" +
  6. "Width = " + width + "\n" +
  7. "Floor area = " + this.area() + "\n" +
  8. "Volume = " + this.volumn();
  9. } // End of method
  10. } // End of class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement