Не могу понять, что не так. Ругается на класс Имя, цвет, возраст. Рек.от ментора: Убедись, что метод initialize инициализирует переменные класса переданными значениями.
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
String name = null;
int age =6;
int weight = 5;
String address = null;
String color = "blue";
public void initialize(String name)
{
this.name = name;
this.age = age;
this.weight = weight;
this.color = color;
}
public void initialize(String name, int age, int weight)
{
this.name = name;
this.age = age;
this.weight = weight;
this.color = color;
}
public void initialize(String name, int age)
{
this.name = name;
this.age = age;
this.weight = weight;
this.color = color;
}
public void initialize(int weight, String color)
{
this.age = age;
this.weight = weight;
this.color = color;
}
public void initialize(int weight, String color, String address)
{
this.age = age;
this.weight = weight;
this.color = color;
this.address = address;
}
//напишите тут ваш код
}