Advertisement
jaVer404

level05.lesson09.task04

Apr 3rd, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.00 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.     //Напишите тут ваш код
  13.     int centerX, centerY, radius, width;
  14.     String color;
  15.  
  16.     Circle (int centerX, int centerY, int radius) {
  17.         this.centerX = centerX;
  18.         this.centerY = centerY;
  19.         this.radius = radius;
  20.     }
  21.  
  22.     Circle (int centerX, int centerY, int radius, int width) {
  23.         this.centerX = centerX;
  24.         this.centerY = centerY;
  25.         this.radius = radius;
  26.         this.width = width;
  27.     }
  28.  
  29.     Circle (int centerX, int centerY, int radius, int width, String color) {
  30.         this.centerX = centerX;
  31.         this.centerY = centerY;
  32.         this.radius = radius;
  33.         this.width = width;
  34.         this.color = color;
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement