-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExpression.java
More file actions
41 lines (36 loc) · 1.02 KB
/
Expression.java
File metadata and controls
41 lines (36 loc) · 1.02 KB
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
/**
* Write a description of class Expression here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Expression
{
// instance variables - replace the example below with your own
protected Expression aParent;
protected Expression aEnfantDroit;
protected Expression aEnfantGauche;
/**
* Default constructor for objects of class Expression
*/
public Expression(Expression enfantDroit,Expression enfantGauche)
{
this.aParent = null;
this.aEnfantDroit = enfantDroit;
this.aEnfantGauche= enfantGauche;
this.aEnfantDroit.addParent(this);
this.aEnfantGauche.addParent(this);
} // Expression()
public Expression()
{
this.aParent = null;
this.aEnfantDroit = null;
this.aEnfantGauche= null;
}
public void addParent(Expression pParent)
{
this.aParent = pParent;
}
public String print()
{ return "";}
} // Expression