Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.javarush.test.level05.lesson07.task04;
- /* Создать класс Circle
- Создать класс (Circle) круг, с тремя инициализаторами:
- - centerX, centerY, radius
- - centerX, centerY, radius, width
- - centerX, centerY, radius, width, color
- */
- public class Circle
- {
- //Напишите тут ваш код
- private int centerX = 0;
- private int centerY = 0;
- private int radius = 0;
- private int cWidth = 0;
- private String cColor = null;
- public void initialize(int x, int y, int r)
- {
- this.centerX = x;
- this.centerY = y;
- this.radius = r;
- }
- public void initialize(int x, int y, int r, int width)
- {
- this.centerX = x;
- this.centerY = y;
- this.radius = r;
- this.cWidth = width;
- }
- public void initialize(int x, int y, int r, int width, String color)
- {
- this.centerX = x;
- this.centerY = y;
- this.radius = r;
- this.cWidth = width;
- this.cColor = color;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement