// @topic T11402 MVC Demo - concatenate strings // @brief The Controller class example /* * @author ik * */ package hw4; public class ControllerConcatenation { //-------------------------- // data attributes //-------------------------- private MainWindow window; private ConcatenationEngine engine; //-------------------------- // constructors //-------------------------- public ControllerConcatenation() { engine = new ConcatenationEngine(); } //-------------------------- // operations //-------------------------- public void concatenate() { getEngine().setLeft(window.getLeftString()); getEngine().setRight(window.getRightString()); } public String getResult() { return getEngine().getResult(); } public MainWindow getWindow() { return window; } public void setWindow(MainWindow window) { this.window = window; } public ConcatenationEngine getEngine() { return engine; } public void setEngine(ConcatenationEngine engine) { this.engine = engine; } }//class ControllerConcatenation