-
Notifications
You must be signed in to change notification settings - Fork 0
/
AlgebraicExpression.java
52 lines (28 loc) · 995 Bytes
/
AlgebraicExpression.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import java.util.Hashtable;
public class AlgebraicExpression{
private Hashtable<AlgebraicExpression, AlgebraicExpression> evalTable;
public AlgebraicExpression(){
}
public boolean contains(AlgebraicExpression expression){
return false;
}
public AlgebraicExpression get(AlgebraicExpression expression){
return null;
}
public void set(AlgebraicExpression expression, AlgebraicExpression evaluation){
/*
Sometimes, people may try to evaluate for something illegally.
For example:
x has been evaluated to 2. x := 2
They then try to set("x+2", "7") which doesn't make sense, because "x+2 = 4"...
*/
}
public Hashtable<AlgebraicExpression, AlgebraicExpression> getEvalTable(){
return evalTable;
}
public void setEvalTable(Hashtable<AlgebraicExpression, AlgebraicExpression> evalTable){
this.evalTable = null;
}
public void show(){
}
}