package persons;

/**
 * Created by fcmam5 on 11/13/15.
 * Implemented by Mouilah-Sarra
 */
public class Donor extends Personne {
    private static int donNum = 0;
    private int quantite;
    boolean motivation;

    public Donor(String name, String firstName, int age, String grouping, String[] adresse, int quantite, boolean motivation) {
        super(name, firstName, age, grouping, adresse);
        this.donNum++;
        this.quantite = quantite;
        this.motivation = motivation;
    }


    public void setGroupage (String gropage){
        setGrouping(gropage);
        
}
    public String getGroupage(){
        return getGrouping();
}

    public int getDonNum( ){
        return this.donNum;
       
    }

    // HOw much he gives ?
    public void setQuantite (int quantite){
    this.quantite=quantite;
}

    public int getQuantite (){
        return this.quantite;
    }


}     


@@ -11,16 +11,43 @@
 rsons;%0A%0A
+import java.util.Objects;%0A%0A
 /**%0A * C
@@ -215,16 +215,24 @@
 te;%0A    
+private 
 boolean 
@@ -242,16 +242,115 @@
 ivation;
+%0A    private Object donorCard%5B%5D = new Object%5B3%5D; // %5B%5Bint DonorKey%5D%7C%5BString email%5D%7C%5Bint telNumber%5D%5D
 %0A%0A    pu
@@ -1030,12 +1030,784 @@
 %7D%0A%0A%0A
-%7D 
     
+/**%0A     *  if He is motivated let's keep his infos in a table :%0A     *  %5B%5BString DonorKey%5D%7C%5BString email%5D%7C%5Bint telNumber%5D%5D%0A     *  DonorKey is %5BfirstDon+the name & first's first nameLetter%5D%0A     *      Example : %22Johny Bob's first donNum was 54 (Was the the 54th donor)%22%0A     *                 His code will be : JB54%0A     */%0A%0A    public Donor(String name, String firstName, int age, String grouping, String%5B%5D adresse_given, int quantite) %7B%0A        super(name, firstName, age, grouping, adresse_given);%0A        this.quantite = quantite;%0A        this.motivation = true;%0A%0A        //Filling DonorCard :%0A        this.donorCard%5B0%5D = name.charAt(0)+firstName.charAt(0)+this.getDonNum(); //Code B-)%0A        this.donorCard%5B1%5D = name;%0A        this.donorCard%5B2%5D = firstName;%0A    %7D%0A%0A%7D
 %0A%0A

Set a key to donors