Question: OUTLINE FOR METHOD: public List interpret(String script) { //recieves a script as a parameter String query = script; List responses = new LinkedList (); return

OUTLINE FOR METHOD:
public List
String query = script;
List
return responses;
}
Implement the core.Database. interpret method to provide a database management system with an interpreter as follows. Receive a script as a parameter, and split the script on semicolons into a sequence of individual queries. It is always safe to do so because semicolons are used exclusively as delimiters between queries in a script and never within an individual query. Initialize an empty list of responses. For each query in sequence, execute the query using an appropriate driver, and add the response to the list of responses. Return the list of responses. The list of responses may never include a null response. If there is no appropriate driver for a query, a non-null response should be created including a message explaining that the query was unrecognized and a flag indicating failure. Implement the core.Database. interpret method to provide a database management system with an interpreter as follows. Receive a script as a parameter, and split the script on semicolons into a sequence of individual queries. It is always safe to do so because semicolons are used exclusively as delimiters between queries in a script and never within an individual query. Initialize an empty list of responses. For each query in sequence, execute the query using an appropriate driver, and add the response to the list of responses. Return the list of responses. The list of responses may never include a null response. If there is no appropriate driver for a query, a non-null response should be created including a message explaining that the query was unrecognized and a flag indicating failure
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
