Ask Question
25 March, 07:39

Windows on the desktop are just one of many objects used in a graphical user interface (GUI) - - buttons, drop-down list boxes, pop-up menus, are just some of the many others. Regardless of their particular appearance, tasks, and structure, all such GUI components share some common functionality- - which is handled in a manner unique to the actual component.

Define an interface, GUIComponent, with the following methods:

o nclick- - void-returning and accepts a single integer parameter

onCursorFocus - - void-returning and accepts a single integer parameter

move - - 3 overloaded methods: all boolean-returning; one accepts a pair of integer parameters; the second a single parameter of type Position; the third a single parameter of type Dimension

resize- - boolean-returning and accepts a pair of integer parameters

+2
Answers (1)
  1. 25 March, 09:26
    0
    The GUI component is defined as follows

    abstract interface GUIComponent {

    public abstract void o nclick (int a);

    public abstract void onCursorFocus (int a);

    public abstract boolean move (int a, int b);

    public abstract boolean move (Position a);

    public abstract boolean move (Dimension a);

    public abstract boolean resize (int a, int b);

    }

    Explanation:

    Here the first line is the definition of the interface GUIComponent with the type abstract.

    The second line is the public abstract with no return o nclick function for int a.

    The third line is the public abstract with no return o nclickFocus function for int a.

    The fourth line is the public abstract with boolean return moving the cursor to int a and int b.

    The fifth line is the public abstract with boolean return moving the cursor to Position a.

    The sixth line is the public abstract with boolean return dimensioning the cursor to Position a.

    The seventh line is the public abstract with boolean return resizing to int a and int b.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Windows on the desktop are just one of many objects used in a graphical user interface (GUI) - - buttons, drop-down list boxes, pop-up ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers