подскажите,а то я не понимаю
package com.javarush.task.task05.task0517;
/*
Конструируем котиков
Создать класс Cat (кот) с пятью конструкторами:
- Имя,
- Имя, вес, возраст
- Имя, возраст (вес стандартный)
- вес, цвет, (имя, адрес и возраст - неизвестные. Кот - бездомный)
- вес, цвет, адрес (чужой домашний кот)
Задача конструктора - сделать объект валидным.
Например, если вес не известен, то нужно указать какой-нибудь средний вес.
Кот не может ничего не весить.
То же касательно возраста. А вот имени может и не быть (null). То же касается адреса: null.
*/
public class Cat {
String name;
int age;
int weight;
String address;
String color;
public Cat(String name)
{
this.name = name;
this.age = 5;
this.color = " ";
this.weight = 89;
}
public Cat(String name, int age, int weight)
{
this.name = name;
this.weight = weight;
this.age = age;
this.color = "Black";
}
public Cat(String name, int age)
{
this.name = name;
this.age = age;
this.color = "blyvata";
this.weight = 5;
}
public Cat(int weight, String color)
{
this.age = 6;
this.color = color;
this.weight = weight;
}
public Cat(int weight, String color, String address)
{
this.address = address;
this.age = 5;
this.color = color;
this.weight = weight;
}
public static void main(String[] args) {
}
}