package com.anna.participant.bean;

import javax.print.attribute.standard.PresentationDirection;

public class ParticipantBean {
    private String id;
    private String name;
    private int theoryMark1;
    private int theoryMark2 ;
    private int practicalMark1;
    private int practicalMark2;
    private boolean isSportsQuota;

    private int total;
    private String result;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getTheoryMark1() {
        return theoryMark1;
    }

    public void setTheoryMark1(int theoryMark1) {
        this.theoryMark1 = theoryMark1;
    }

    public int getTheoryMark2() {
        return theoryMark2;
    }

    public void setTheoryMark2(int theoryMark2) {
        this.theoryMark2 = theoryMark2;
    }

    public int getPracticalMark1() {
        return practicalMark1;
    }

    public void setPracticalMark1(int practicalMark1) {
        this.practicalMark1 = practicalMark1;
    }

    public int getPracticalMark2() {
        return practicalMark2;
    }

    public void setPracticalMark2(int practicalMark2) {
        this.practicalMark2 = practicalMark2;
    }

    public void computeTotal(){
        int mark1 = theoryMark1 + practicalMark1;
        int mark2 = theoryMark2 + practicalMark2;

        int tot = mark1 + mark2;

        total = tot/2;
    }

    public int getTotal(){
        return total;
    }

    public void setSportsQuota(boolean isSportsQuota){
        this.isSportsQuota = isSportsQuota;
    }

    public boolean getSportsQuota(){
        return isSportsQuota;
    }

    public void computeResult(){
        if (total >= 40){
            result = "Pass";
        }
        else{
            result = "Fail";
        }
    }
    public String getResult(){
        return result;
    }
}

