Не хочу нажимать "правильное решение", но никак не могу сообразить в чём затык. Создаю отдельно блок просто конструктор без ничего, проверяю кнопкой "запустить" -- всё норм, ошибок в синтаксисе не выдаёт. Раскопировал на пять штук, заполнил параметры -- ругается что нет конструктора.
package com.javarush.task.task05.task0517;
/*
Конструируем котиков
*/
public class Cat {
//напишите тут ваш код
String name;
int age;
int weight;
String address;
String color;
public Cat (String name){
this.name = "cat1";
this.age = age;
this.weight = weight;
this.address = address;
this.color = color;
}
public Cat (String name, int age, int weight){
this.name = "cat2";
this.age = 1;
this.weight = 1;
this.address = address;
this.color = color;
}
public Cat (String name, int age){
this.name = "cat3";
this.age = 3;
this.weight = weight;
this.address = address;
this.color = color;
}
public Cat (int weight, String color){
this.name = name;
this.age = age;
this.weight = 2;
this.address = address;
this.color = "black";
}
public Cat (int weight, String address, String color){
this.name = name;
this.age = age;
this.weight = 5;
this.address = "me";
this.color = "blue";
}
public static void main(String[] args) {
}
}