Advertisement
Azazavr

javarush.test.level05.lesson09.task04

Oct 31st, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.95 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, centerY, radius, width;
  13.     String color;
  14.    
  15.     Circle (int centerX, int centerY, int radius){
  16.         this.centerX = centerX;
  17.         this.centerY = centerY;
  18.         this.radius = radius;
  19.     }
  20.     Circle (int centerX, int centerY, int radius, int width){
  21.         this.centerX = centerX;
  22.         this.centerY = centerY;
  23.         this.radius = radius;
  24.         this.width = width;
  25.     }
  26.     Circle (int centerX, int centerY, int radius, int width, String color){
  27.         this.centerX = centerX;
  28.         this.centerY = centerY;
  29.         this.radius = radius;
  30.         this.width = width;
  31.         this.color = color;
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement