|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--animal
|
+--singe
Classe permettant d'instancier un singe
| Field Summary | |
protected int |
age
Age en cours de cet animal |
protected int |
age_maxi
Age que cet animal ne peut pas dépasser |
private static int |
agemaxsinge
Age maximum d'un chien |
protected zoo |
monzoo
Zoo auquel appartient l'animal |
protected java.lang.String |
nom
Nom de l'animal |
private static java.lang.String |
parle
Cri d'un singe |
private java.lang.String |
prenom
Prénom d'un chien |
protected boolean |
vivant
Booléen indiquant si l'animal est vivant |
| Constructor Summary | |
singe()
Contructeur d'un singe sans caracteristique |
|
singe(java.lang.String nom_singe)
Contructeur d'un singe en passant son nom en argument |
|
singe(java.lang.String nom_singe,
java.lang.String sonprenom)
Contructeur d'un singe en passant son nom et prenom en argument |
|
| Method Summary | |
java.lang.String |
crie()
Fait parler ce singe |
protected void |
mourir()
Fait mourir cet animal |
protected java.lang.String |
nom()
Donne le nom de cet animal |
protected void |
nourrir()
Nourit un animal |
java.lang.String |
toString()
Retourne les caracteristiques du singe |
protected boolean |
vieillir()
Fait vieillir l'animal d'un an par défaut |
protected boolean |
vieillir(int qte)
Fait vieillir l'animal en incrementant son age avec le paramètre passé à la fonction |
protected boolean |
vivant()
Indique si l'animal vit |
protected void |
voilatonzoo(zoo nouveau_zoo)
Place cet animal dans un zoo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.String prenom
private static final int agemaxsinge
private static final java.lang.String parle
protected boolean vivant
protected int age
protected int age_maxi
protected java.lang.String nom
protected zoo monzoo
| Constructor Detail |
public singe()
public singe(java.lang.String nom_singe)
nom_singe - Nom du singe
public singe(java.lang.String nom_singe,
java.lang.String sonprenom)
nom_singe - Nom du singesonprenom - Prénom du singe| Method Detail |
public java.lang.String toString()
toString in class animalpublic java.lang.String crie()
crie in class animalprotected void nourrir()
protected boolean vieillir(int qte)
qte - Entier représentant le nombre d'années par lequel doit etre incrementé l'age de l'animal
protected boolean vieillir()
protected java.lang.String nom()
protected boolean vivant()
protected void voilatonzoo(zoo nouveau_zoo)
nouveau_zoo - Zoo auquel appartient l'animalprotected void mourir()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||