Не могу понять, в чем проблема, намекните куда смотреть )
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
String name, address, color;
int age, weight;//Создали переменные.
public void initialize (String name){
this.name = name;// Инициализатор имени, остальное не известно.
this.age = 10;
this.weight = 100;
this.color = "Unknown";
this.address = null;
}
public void initialize(String name, int weight, int age ){
this.name = name;// Известный имя, вес и возраст.
this.weight = weight;
this.age = age;
this.color = "Unknown";
this.address = null;
}
public void initialize(String name, int age){
this.name = name; // Известны имя и возраст.
this.age = age;
this.weight = 100;
this.color = "Unknown";
this.address = null;
}
public void initialize (int weight, String color){
this.name = null;
this.age = 10;
this.weight = 100;
this.color = color;
this.address = null;
}
public void initialize(int weight, String color, String adress){
this.name = null;
this.age = 10;
this.weight = weight;
this.color = color;
this.address = adress;
}
public static void main(String[] args) {
}
}