Guest User

Untitled

a guest
Feb 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. public class Box
  2. {
  3. private int currentHeight;
  4. private int currentWidth;
  5. private int currentDepth;
  6. private boolean full;
  7.  
  8. public Box(int currentHeightInt)
  9. {
  10. currentHeight = currentHeightInt;
  11.  
  12. }
  13.  
  14. public int getCurrentHeight()
  15. {
  16. return currentHeight;
  17. }
  18.  
  19. public void setCurrentHeight(int newCurrentHeight)
  20. {
  21. currentHeight = newCurrentHeight;
  22. }
  23.  
  24. public int getCurrentWidth()
  25. {
  26. return currentWidth;
  27. }
  28.  
  29. public void setCurrentWidth(int newCurrentWidth)
  30. {
  31. currentWidth = newCurrentWidth;
  32. }
  33.  
  34. public int getCurrentDepth()
  35. {
  36. return currentDepth;
  37. }
  38.  
  39. public void setCurrentDepth(int newCurrentDepth)
  40. {
  41. currentDepth = newCurrentDepth;
  42. }
  43.  
  44. public boolean getFull()
  45. {
  46. return full;
  47. }
  48.  
  49. public void setFull(boolean newFull)
  50. {
  51. full = newFull;
  52. }
  53.  
  54. public String toString ()
  55. {
  56. return ("Height" + "\t" + currentHeight + "\n" +
  57. "Width" + "\t" + currentWidth + "\n" +
  58. "Depth" + "\t" + currentDepth + "\n" +
  59. "Full?" + "\t" + full + "\n");
  60. }
  61. }
Add Comment
Please, Sign In to add comment