Помогите, пожалуйста, что может быть тут неправильно ?
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
String name;
int weight;
int age;
String color;
String address;
public void initialize (String name)
{
this.name = name;
this.weight = 12;
this.age = 10;
this.color = "white";
this.address = null;
}
public void initialize (String name, int weight, int age){
this.name = name;
this.weight = weight;
this.age = age;
this.color = color;
this.address = null;
}
public void initialize (String name, int age)
{
this.name = name;
this.weight = weight;
this.age = age;
this.color = color;
this.address = null;
}
public void initialize (int weight, String color)
{
this.name = null;
this.weight = weight;
this.age = age;
this.color = color;
this.address = null;
}
public void initialize (int weight, String color, String address)
{
this.name = null;
this.weight = 5;
this.age = 2;
this.color = "black";
this.address = "Russia";
}
}
package com.javarush.task.task05.task0510;
/*
Кошкоинициация
*/
public class Cat {
String name;
int weight;
int age;
String color;
String address;
public void initialize (String name)
{
this.name = name;
this.weight = 12;
this.age = 10;
this.color = "white";
this.address = null;
}
public void initialize (String name, int weight, int age){
this.name = name;
this.weight = weight;
this.age = age;
this.color = color;
this.address = null;
}
public void initialize (String name, int age)
{
this.name = name;
this.weight = weight;
this.age = age;
this.color = color;
this.address = null;
}
public void initialize (int weight, String color)
{
this.name = null;
this.weight = weight;
this.age = age;
this.color = color;
this.address = null;
}
public void initialize (int weight, String color, String address)
{
this.name = null;
this.weight = 5;
this.age = 2;
this.color = "black";
this.address = "Russia";
}
}