/*
 * Created on 22 déc. 2003
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
// package jmvanel.formation;

/**
 * @author jmv
 */

public class Personne {
	private String nom;
	private String prenom;
	private Personne father;
	private Personne[] children;
	private int size;

	public Personne() {}
	
	public Personne(String nom, String prenom){
		this.nom = nom;
		this.prenom = prenom;
	}

	public String affiche(){
		return prenom+" "+nom;
	}
	public String toString() {
		return nom;
	}

	// JavaBean properties
	public void setSize(int s) {
		this.size = s;
	}
	public int getSize() {
		return size;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}
	public String getNom() {
		return nom;
	}
	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}
	public String getPrenom() {
		return prenom;
	}

	public void setFather(Personne father) {
		this.father = father;
	}
	public Personne getFather() {
		return father;
	}

	// Methods to access the entire indexed property array
	public void setChildren(Personne[] children) {
		this.children = children;
	}
	public Personne[] getChildren() {
		return children;
	}
	// Methods to access individual values
	public void setChildren(int index, Personne child) {
		// this.children = children;
	}
	public Personne getChildren(int index) {
		return null; // children;
	}
}
