What is wrong?
package com.codegym.task.task05.task0517;
/*
Creating cats
Create the Cat class with five constructors:
- Name,
- Name, weight, age
- Name, age (standard weight)
- Weight, color (name, address, and age are unknown; the cat is homeless)
- Weight, color, address (someone else's pet)
The constructor's job is to make the object valid.
For example, if the weight is unknown, then you need to specify some average weight.
A cat can't weigh nothing.
The same applies to age. But there may or may not be a name (i.e. name might be null).
The same applies to the address (it might be null).
*/
public class Cat {
//write your code here
public String name;
public int weight = 3;
public int age = 5;
public String color;
public String address = null;
public Cat(String name){
name = "bon";
this.weight = weight;
this.age = age;
this.color = color;
}
public Cat(String name, int weight, int age){
this.name = name;
this.weight = weight;
this.age = age;
}
public Cat(String name, int age){
name = "bob";
this.age = age;
this.weight = weight;
this.color = color;
}
public Cat(int weight, String color){
this.name = null;
this.address = null;
this.weight = weight;
this.color = color;
}
public Cat(int weight, String color, String address){
this.weight = weight;
this.color = color;
this.address = address;
}
public static void main(String[] args) {
}
}