Guest User

Untitled

a guest
Jul 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public MoebiusStripCoordinate(int i, int j) {
  2.  
  3. if (i < 0 || j < 0) {
  4. throw new IllegalArgumentException("Negativer Wert");
  5. } else {
  6. if (j > m) {
  7. throw new IllegalArgumentException("Negativer Wert");
  8. } else {
  9. setX(i);
  10. setY(j);
  11. }
  12. }
  13. }
  14.  
  15. /* Besser lesbar, gleiche Funktion */
  16. public MoebiusStripCoordinate(int i, int j) {
  17.  
  18. if (i < 0 || j < 0) {
  19. throw new IllegalArgumentException("Negativer Wert");
  20. }
  21. if (j > m) {
  22. throw new IllegalArgumentException("Negativer Wert");
  23. }
  24. setX(i);
  25. setY(j);
  26. }
Add Comment
Please, Sign In to add comment