Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public Dot(String color,int theX,int theY, int theRadius) {
  2. if(!(Arrays.asList(LEGAL_COLOR_NAMES).contains(color))){
  3. String err = "Not a valid color";
  4. IllegalArgumentException x = new IllegalArgumentException(err);
  5. throw x;
  6. }
  7. this.color_name = color;
  8. this.x = theX;
  9. this.y = theY;
  10. this.radius = theRadius;
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement