package jatek0003;

import java.util.Comparator;


public class Answer implements Comparator{
    private String E1,E2,A1,A2;
	private double an1;
	private String an2;
	private String sex;
	private int age;
	private double alfa;
	
	public Answer(){
		
	}
	
	public Answer(String e1,String e2,String a1,String a2,double d,String s,String se,int ag){
		this.E1=e1;
		this.E2=e2;
		this.A1=a1;
		this.A2=a2;
		this.an1=d;
		this.an2=s;
		this.sex=se;
		this.age=ag;
	}
	public double getAn1() {
		return an1;
	}
	public void setAn1(double an1) {
		this.an1 = an1;
	}
	public String getAn2() {
		return an2;
	}
	public void setAn2(String an2) {
		this.an2 = an2;
	}
	public String getE1() {
		return E1;
	}
	public void setE1(String e1) {
		E1 = e1;
	}
	public String getE2() {
		return E2;
	}
	public void setE2(String e2) {
		E2 = e2;
	}
	public String getA1() {
		return A1;
	}
	public void setA1(String a1) {
		A1 = a1;
	}
	public String getA2() {
		return A2;
	}
	public void setA2(String a2) {
		A2 = a2;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public double getAlfa() {
		return alfa;
	}
	public void setAlfa(double alfa) {
		this.alfa = alfa;
	}
	@Override
	public int compare(Object a1o, Object a2o) {
		Answer a1=(Answer)a1o;
		Answer a2=(Answer)a2o;
		int sort = ((Double)a1.getAn1()).compareTo((Double)a2.getAn1());
	    return sort;
	}
	
}