ya_zay4eg

level05.lesson07.task04

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