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 width = 0;
- private String color = null;
- public void initialize (int centerX, int centerY, int radius) {
- this.centerX=centerX;
- this.centerY=centerY;
- this.radius=radius;
- }
- public void initialize (int centerX, int centerY, int radius, int width) {
- this.centerX=centerX;
- this.centerY=centerY;
- this.radius=radius;
- this.width=width;
- }
- public void initialize (int centerX, int centerY, int radius, int width, String color) {
- this.centerX=centerX;
- this.centerY=centerY;
- this.radius=radius;
- this.width=width;
- this.color=color;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment