CMPUT 301

Software Engineering

Class Participation Exercise Command Pattern


  1. Draw the UML Class diagram for commands that you expect would exist inside of a text editor.
  2. Give example code of how you would fill in the CutMenuListener's void menuAction() Method of the Edit Menu's "Cut MenuItem"
class CutMenuListener {
// this is called when the Cut menu item in the Edit Menu
// is clicked or the key combo ctrl-X is pressed.
    public void menuAction() {

    }
}

Submit your drawing as a PNG file.

image