Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. public void maxBoden(){
  2. if(breite<höhe)
  3. swapHöheBreite();
  4. if(länge<höhe)
  5. swapHöheLänge();
  6. }
  7.  
  8. public void maxHöhe(){
  9. if(höhe<breite)
  10. swapHöheBreite();
  11. if(höhe<länge)
  12. swapHöheLänge();
  13. }
  14.  
  15. private void swapHöheBreite(){
  16. double x;
  17. x=höhe;
  18. höhe=breite;
  19. breite=x;
  20. }
  21.  
  22. private void swapHöheLänge(){
  23. double x;
  24. x=höhe;
  25. höhe=länge;
  26. länge=x;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement