package app;

import ui.UserView;

public class Controller {
	
	public String getUserInput(String s) {
		// TODO: get user input from UserView
		return s;
	}

	public static void main(String[] args) {
		System.out.println("Hello World!~");
		System.out.println("and open window...");
		javafx.application.Application.launch(UserView.class);
	}
	
}

@@ -18,145 +18,1073 @@
 ort 
-ui.UserView;%0A%0Apublic class Controller %7B%0A%09%0A%09public String getUserInput(String s) %7B%0A%09%09// TODO: get user input from UserView%0A%09%09return s;%0A%09%7D%0A
+java.sql.Connection;%0A%0Aimport model.SQLQuery;%0Aimport model.SchemaGraph;%0Aimport ui.UserView;%0A%0A%0A/**%0A * The controller to control database and UI.%0A * @author keping%0A */%0Apublic class Controller %7B%0A%09private SchemaGraph schemaGraph;%0A%09private Connection connection; %0A%09%0A%09/**%0A%09 * Start connection with the database.%0A%09 */%0A%09public void startConnection() %7B%0A%09%09// TODO%0A%09%7D%0A%09/**%0A%09 * Close connection with the database.%0A%09 */%0A%09public void closeConnection() %7B%0A%09%09// TODO%0A%09%7D%0A%09/**%0A%09 * Get user input from the view.%0A%09 * @param s%0A%09 * @return%0A%09 */%0A%09public String getUserInput(String s) %7B%0A%09%09// TODO: get user input from UserView%0A%09%09return s;%0A%09%7D%0A%09/**%0A%09 * Process natural language and return an sql query.%0A%09 * @param nl%0A%09 * @return%0A%09 */%0A%09public SQLQuery processNaturalLanguage(String nl) %7B%0A%09%09// TODO: process the natural language.%0A%09%09return new SQLQuery(%22Hello I'm an sql query%22);%0A%09%7D%0A%09/**%0A%09 * Show an sql query in view.%0A%09 * @param query%0A%09 */%0A%09public void viewQuery(SQLQuery query) %7B%0A%09%09// TODO%0A%09%7D%0A%09/**%0A%09 * Get schema graph from data base.%0A%09 */%0A%09public void getSchemaGraphFromDB() %7B%0A%09%09// TODO%0A%09%7D%0A%09%0A%09
 %0A%09pu

add basic methods in Controller