private void addTerm(Term nextTerm) {
		//this takes care of reorganizing each term in the polynomial in the correct descending order. 
		//This will not add terms with coefficient equal to zero and will add zero if the polynomial is empty
		if(nextTerm.getCoefficient()!=0){
			if(this.terms.isEmpty()){
				this.terms.add(nextTerm);
			}
			else{
				boolean notAdded=true;
				for(int i=0;i<this.terms.size();i++){
					if(nextTerm.getExponent()>this.terms.get(i).getExponent())
					{
						this.terms.add(i, nextTerm);
						notAdded=false;
						break;
					}
				}
				if(notAdded){
					this.terms.add(nextTerm);
				}
			}
		}
		else{
			if(this.terms.isEmpty() && nextTerm.getExponent()==0){
				this.terms.add(nextTerm);
			}
		}
	}