public class CompteCourant extends CompteEnBanque {
	private String carte, code;
	public CompteCourant(String n, Personne t, 
			double s, double l, double tx, String carte, String code){
		super(n,t,s,l,tx);
		this.carte = carte;
		this.code = code;
	}
	public CompteCourant(String n, Personne t){
		this(n,t,0,0,0.02,"","0000");
	}
	public String getCarte() {
		return carte;
	}
	public void setCarte(String carte) {
		this.carte = carte;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public boolean virement(double montant,CompteEnBanque b){
		System.out.println("Bon, j'essaie le virement...");
		if(this.retrait(montant) && b.depot(montant))
			return true;
		else
			return false;
	}
	public String afficheToi(){
		String s = "Je suis le compte courant n°"+this.getNumero()+
		" de M. "+this.getTitulaire().getNom()+
		" et mon solde est de "+this.getSolde();
		System.out.println(s);
		return s;
	}
}
