
/**
 * This is an oversimplified representation of a student
 * A student has a name, phone number, Achieve Credits, Merit Credits and Excellence Credits
 *
 * @author (your name)
 * @version (a version number or a date)
 */
public class Student
{
    // instance variables - replace the example below with your own
    public String name;
    public int achieve;
    public int merit;
    public int excellence;

    /**
     * To Create a student object, we just need their name.
     */
    public Student(String name, int achieve, int merit, int excellence){
        this.name = name;
        this.achieve = achieve;
        this.merit = merit;
        this.excellence = excellence;
    }
    
    /**
     * Returns whether the student has NCEA level 2
     */
    public boolean hasNCEA(int achieve, int merit, int excellence){
        if((achieve + merit + excellence) >= 60){
            return true;
        }else{
            return false;
        }
    }
    
    /**
     * Returns whether the student has NCEA level 2
     * Should return none, Merit or Excellence
     */
    public String hasEndorsement(int achieve, int merit, int excellence){
        if(excellence >= 50){
            return "excellence";
        }else if(merit + excellence >= 50){
            return "merit";
        }else if(achieve + merit + excellence >= 50){
            return "achieved";
        }else{
            return "no endorsement";
        }
    }
    
    /**
     * Returns whether the student has NCEA level 2
     * Should return none, Merit or Excellence
     */
    public String achievementDist(int achieve, int merit, int excellence){
        if(achieve + merit + excellence >= 60){
            return "Level 2 achieved.";
        }else{
            return "Currently N/A. " + (60 - achieve + merit + excellence) + " credits away from Level 2";
        }
    }
}
