by Isai Damier

 * Author: Isai Damier
 * Title:
 * Project: geekviewpoint
 * Package: datastructure
 * Description: Normally modern computers cannot handle very large
 *    numbers. So the task here is to create a datastructure that
 *    can handle numbers of perhaps infinite size. And to prove that
 *    the datastructure works, included are arithmetic operators.
 *    Naturally the numbers are represented as Strings. And to
 *    perform addition and subtraction, stacks are used as the media.
 *    Finally, as any trusty calculator, this datastructure returns
 *    erroneous values for erroneous inputs and correct values for
 *    correct inputs. This is to say, if an input string does not
 *    represent a valid decimal integer, then the output string
 *    will be bogus.
 import java.util.Stack;

public class LargeInteger {

  private String number;

  public LargeInteger(String number) {
    this.number = number;

  public String value() {
    return this.number;
import org.junit.Test;
import static org.junit.Assert.*;

public class LargeIntegerTest {

   * Test of value method, of class LargeInteger.
  public void testValue() {
    LargeInteger bigInteger;
    String a = "8787284297498234897287345";
    bigInteger = new LargeInteger(a);
    assertEquals(a, bigInteger.value());