public class DataFactory {
/* generator of instances for each abstract data type */

public static QueueTreeInterface makeQueueTree(){
//post: returns an instance of ADT QueueTree
return (QueueTreeInterface) new QTree(); /* use the name of your class here */
}

public static QueueTreeInterface makeQueueTree(Object root){
//post: returns an instance of the ADT QueueTree
return (QueueTreeInterface) new QTree(root); /* use the name of your class here */
}

public static QueueInterface makeQueue(){
//post: returns an instance of ADT Queue
return (QueueInterface) new QueueReferenceBased(); /* this is the provided class name */

}

}


