Не могу понять логику задания, в каком случае надо что делать? Часть методов инициализирована, а часть нет
принимающий в качестве параметров имя, вес, возраст и инициализирующий все переменные класса, кроме
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
private String catinfo = null;
private String name = null;
private int age = 3;
private int weight = 4;
private String address = null;
private String color;
public void initialize(String name){//1-7
this.name = name;
this.age = 5;
this.weight = 4;
this.color = "black";
}
public void initialize(String name, int age, int weight){//2-8
this.name = name;
this.age = age;
this.weight = weight;
this.color = "red";
}
public void initialize(String name, int age){//3-9
this.name = name;
this.age = age;
this.weight = 5;
this.color = "grey";
}
public void initialize(int weight, String color){//4-10
this.age = 3;
this.weight = weight;
this.color = color;
}
public void initialize(int weight, String address, String color){//5-11
this.age = 5;
this.weight = weight;
this.color = color;
this.address = address;
}//напишите тут ваш код
public static void main(String[] args) {
}
}