Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. package com.javarush.test.level05.lesson07.task04;
  2.  
  3. /* Создать класс Circle
  4. Создать класс (Circle) круг, с тремя инициализаторами:
  5. - centerX, centerY, radius
  6. - centerX, centerY, radius, width
  7. - centerX, centerY, radius, width, color
  8. */
  9.  
  10. public class Circle
  11. {
  12. //Напишите тут ваш код
  13. private int centerX = 0;
  14. private int centerY = 0;
  15. private int radius = 0;
  16. private int cWidth = 0;
  17. private String cColor = null;
  18.  
  19.  
  20. public void initialize(int x, int y, int r)
  21. {
  22. this.centerX = x;
  23. this.centerY = y;
  24. this.radius = r;
  25. }
  26.  
  27. public void initialize(int x, int y, int r, int width)
  28. {
  29. this.centerX = x;
  30. this.centerY = y;
  31. this.radius = r;
  32. this.cWidth = width;
  33. }
  34.  
  35. public void initialize(int x, int y, int r, int width, String color)
  36. {
  37. this.centerX = x;
  38. this.centerY = y;
  39. this.radius = r;
  40. this.cWidth = width;
  41. this.cColor = color;
  42. }
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement