I am creating a GUI for class and need help with my program. My program takes 2 big integers and adds them together. First how do I declare my 2 Big Integers and then add them together? I have read the API docs , but still need help. Thanks!
Code:
import java.math.BigInteger;
public class Integer {
private BigInteger IntegerONE; // both entered as strings from GUI
private BigInteger IntegerTWO;
public Integer() {
}
public Integer( BigInteger IntegerONE, BigInteger IntegerTWO){
this.IntegerONE = IntegerONE; // I am not sure here?
this.IntegerTWO = IntegerTWO;
}
public BigInteger getIntegerONE(){
return IntegerONE;
}
public BigInteger getIntegerTWO(){
return IntegerTWO;
}
public BigInteger add(BigInteger val){
return(val); // Psuedocode says(this + val)
}
Comment