Advertisement
jaVer404

level05.lesson07.task04

Apr 2nd, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.23 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.     int centerX;
  14.     int centerY;
  15.     int radius;
  16.     int width;
  17.     String color;
  18.  
  19.     public void initialize (int centerX, int centerY, int radius) { /*- centerX, centerY, radius*/
  20.         this.centerX = centerX;
  21.         this.centerY = centerY;
  22.         this.radius = radius;
  23.     }
  24.     public void initialize (int centerX, int centerY, int radius, int width) {/*- centerX, centerY, radius, width*/
  25.         this.centerX = centerX;
  26.         this.centerY = centerY;
  27.         this.radius = radius;
  28.         this.width = width;
  29.     }
  30.  
  31.     public void initialize (int centerX, int centerY, int radius, String color) {/*- centerX, centerY, radius, width,
  32.                                                                                     color*/
  33.         this.centerX = centerX;
  34.         this.centerY = centerY;
  35.         this.radius = radius;
  36.         this.color = color;
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement