У меня тот же затык по второму пункту🙄. Порядок Имя, Вес, Возраст идут в правильном порядке, а проверку всё равно не проходит 🤬
public void intialize(String name, int weight, int age)
{
this.name = name;
this.weight = weight;
this.age = age;
this.color = "триколор";
this.address = null;
}package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
//напишите тут ваш код
String name, address, color;
int weight, age;
public void initialize(String name)
{
this.name = name;
this.address = null;
this.color = "триколор" ;
this.weight = 5;
this.age = 3;
}
public void intialize(String name, int weight, int age)
{
this.name = name;
this.weight = weight;
this.age = age;
this.color = "триколор";
this.address = null;
}
public void initialize(String name, int age)
{
this.name = name;
this.age = age;
this.color = "триколор";
this.weight = 3;
this.address = null;
}
public void initialize(int weight, String color)
{
this.weight = weight;
this.color = color;
this.name = null;
this.age = 3;
this.address = null;
}
public void initialize(int weight, String color, String address)
{
this.weight = weight;
this.color = color;
this.address = address;
this.age = 3;
this.name = null;
}
public static void main(String[] args) {
}
}