Hello everyone,
I didn't succeed in this task because of the tree first constructors requirements.
Can anyone help me with this, please?
Thanks in advance.
package fr.codegym.task.task05.task0517;
/*
Création de chats
*/
import javax.swing.plaf.IconUIResource;
public class Chat {
public String nom = null , adresse = null , couleur = null;
public int age , poids ;
//1
public Chat (String nom){
this.nom = nom ;
this.age = 1 ;
this.poids = 150 ;
this.couleur = couleur ;
}
//2
public Chat (String nom , int poids , int age){
this.nom = nom ;
this.age = age ;
this.poids = poids ;
this.couleur = couleur ;
}
//3
public Chat (String nom , int age){
this.nom = nom ;
this.age = age ;
this.poids = 150 ;
this.couleur = couleur ;
}
//4
public Chat (int poids , String couleur){
this.age = 1 ;
this.poids = poids ;
this.couleur = couleur ;
}
//5
public Chat (int poids , String couleur , String adresse){
this.adresse = adresse ;
this.age = 1 ;
this.poids = poids ;
this.couleur = couleur ;
}
public static void main(String[] args) {
}
}