вроде все по заданию, а при проверке одно условие не проходит:
У класса должен быть метод initialize, принимающий в качестве параметров имя, вес, возраст и инициализирующий все переменные класса, кроме адреса.
а все остальные условия соблюдены. почему?
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
private String name = null, address = null, color;
private int age, weight;
public void initialize(String name){
this.name = name;
this.age = 6;
this.weight = 8;
this.color = "Black";
}
public void initialize(String name, int age, int weight){
this.name = name;
this.age = age;
this.weight = weight;
this.color = "Black";
}
public void initialize(String name, int age){
this.name = name;
this.age = age;
this.weight = 8;
this.color = "Black";
}
public void initialize(int weight, String color){
this.weight = weight;
this.color = color;
this.age = 6;
}
public void initialize(int weight, String color, String address){
this.color = color;
this.weight = weight;
this.age = 6;
this.address = address;
}
public static void main(String[] args) {
}
}