public class AddSubInt extends AdditionOnlyInt
| Constructor and Description |
|---|
AddSubInt() |
AddSubInt(AddSubInt a)
Copy constructor; a deep copy should be performed.
|
AddSubInt(java.lang.String a)
This is a constructor that construct an AddSubInt with value presented
by the input string.
|
| Modifier and Type | Method and Description |
|---|---|
static AddSubInt |
add(AddSubInt a,
AddSubInt b)
The method should not have side-effect.
|
static AddSubInt |
subtract(AddSubInt a,
AddSubInt s) |
void |
subtract(BigInt us)
Students don't have to implement this method for Asg3.
|
public AddSubInt()
public AddSubInt(java.lang.String a)
a - is a string such as "000123400"public AddSubInt(AddSubInt a)
a - to be copiedpublic static AddSubInt add(AddSubInt a, AddSubInt b)
a - is AddSubIntb - is AddSubIntpublic void subtract(BigInt us)
AdditionOnlyIntsubtract in interface BigIntsubtract in class AdditionOnlyIntus - to be substracted