ya_zay4eg

level05.lesson09.task04

Nov 24th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. package com.javarush.test.level05.lesson09.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.     int centerX;
  13.     int centerY;
  14.     int radius;
  15.     int width;
  16.     String color;
  17.  
  18.     public Circle (int centerX, int centerY, int radius) {
  19.         this.centerX=centerX;
  20.         this.centerY=centerY;
  21.         this.radius=radius;
  22.     }
  23.  
  24.     public Circle (int centerX, int centerY,int radius, int width) {
  25.         this.centerX=centerX;
  26.         this.centerY=centerY;
  27.         this.radius=radius;
  28.         this.width=width;
  29.     }
  30.  
  31.     public Circle (int centerX, int centerY, int radius, int width,String color) {
  32.         this.centerX=centerX;
  33.         this.centerY=centerY;
  34.         this.radius=radius;
  35.         this.width=width;
  36.         this.color=color;
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment