21103 - VictoriaBrown/MyProgrammingLab_Ch10 GitHub Wiki
QUESTION:
Define an interface GUIComponent consisting of four method declaration : open: void-returning, accepts no parameters close: both accepts no parameters , return boolean indicating whether or not the component is willing to be closed at that point (for example, a text window might have unsaved data and should not be closed) resize: void-returning accepts new width and height (integers ) in that order move: void returning, accepts new x and y positions (in that order) respectively
CODE:
public interface GUIComponent {
// open method:
void open();
// close method:
boolean close();
// resize method:
void resize(int width, int height);
// move method:
void move(int x, int y);
}