Не могу понять в чем проблема, одно условие проходит:
У класса должен быть конструктор, принимающий в качестве параметра имя, но инициализирующий все переменные класса, кроме адреса.
, а остальные нет...
package com.javarush.task.task05.task0517;
/*
Конструируем котиков
*/
public class Cat {
//напишите тут ваш код
private String name;
private int age;
private int weight;
private String address;
private String color;
public Cat(String name) {
this.name = name;
this.age = 2;
this.weight = 2;
this.color = "red";
}
public Cat(String name, int weight, int age) {
this.name = name;
this.age = 3;
this.weight = 3;
this.color = "blue";
}
public Cat(String name, int age) {
this.name = name;
this.age = 4;
this.weight = 4;
this.color = "green";
}
public Cat(int weight, String color) {
this.age = 5;
this.weight = 5;
this.color = "grey";
}
public Cat(int weight, String color, String address) {
this.age = 6;
this.weight = 6;
this.color = "black";
this.address = address;
}
public static void main(String[] args) {
}
}