Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 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.     //Напишите тут ваш код
  13.     String fullInfo = null;
  14.     public void initialize (double centerX, double centerY, double radius)
  15.     {
  16.         this.fullInfo = centerX + "  " + centerY + "  " + radius;
  17.     }
  18.    
  19.     public void initialize (double centerX, double centerY, double radius, double width)
  20.     {
  21.         this.fullInfo = centerX + "  " + centerY + "  " + radius + " " + width;
  22.     }
  23.    
  24.     public void initialize (double centerX, double centerY, double radius, double width, String color)
  25.     {
  26.         this.fullInfo = centerX + "  " + centerY + "  " + radius + " " + width + " " + color;
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement