Вроде как осталось указать возраст без значения
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
String name;
String color;
String address;
int age;
int weight;
public void initialize(String name){
this.name = name;
this.weight = 2;
this.color = "color";
this.age = 1;
}
public void initialize(String name, int weight, int age){
this.name = name;
this.weight = weight;
this.age = age;
this.color = "color";
}
public void initialize(String name, int age){
this.name = name;
this.age = age;
}
public void initialize(int weight, String color){
this.weight = weight;
this.color = color;
this.name = null;
this.address = null;
this.age = ;//как выставить 0й возраст?
}
public void initialize(int weight, String color, String address){
this.weight = weight;
this.color = color;
this.address = address;
this.age = 1;
}
public static void main(String[] args) {
}
}