Csc 1302, Honors Principles of Computer Science II (Fall 2021)
Week 10 (29 October 2021)
Set Relation Names in Expression Tree
In class you will complete the following method from RANode.java:
public void setRelationNames(AtomicInteger globalInt) {
// set unique relation names for every interior node in the tree
// public String relationName;
// Interior nodes name is tempN; Leaf nodes name is relation name
}
Here is the documentation for AtomicInteger:
AtomicInteger. In particular, you will use the second constructor
to initialize the object, and the methods: get() and set() to manipulate the
AtomicInteger.
You can test this method by commenting out the calls to
other methods in RA.java and printing the expression tree after
setting the relation names.