Advertisement
Azazavr

javarush.test.level05.lesson07.task04

Oct 29th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.03 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.     int centerX;
  13.     int centerY;
  14.     int radius;
  15.     int width;
  16.     String color;
  17.    
  18.     public void initialize(int centerX, int centerY, int radius){
  19.         this.centerX = centerX;
  20.         this.centerY = centerY;
  21.         this.radius = radius;
  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.         public void initialize(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