Csc 1302, Honors Principles of Computer Science II (Fall 2021)

Week 14 (3 December 2021)

evaluate() relation at tree node.

During this week you will complete the final method in RANode.java:
  public Relation evaluate(Database db) {
    // evaluate and return relation object for node
    if (rnodetype.equals("relation")) {

    } 
    else if (rnodetype.equals("union")) {

    } 
    else if (rnodetype.equals("intersect")) {

    } 
    else if (rnodetype.equals("minus")) {

    } 
    else if (rnodetype.equals("rename")) {

    } 
    else if (rnodetype.equals("project")) {

    } 
    else if (rnodetype.equals("select")) {

    } 
    else if (rnodetype.equals("times")) {

    } 
    else if (rnodetype.equals("join")) {

    } 
    else {
      System.out.println("SOMETHING SERIOUSLY WENT WRONG!");
      return null;
    }
  }
Final testing against drinks database