Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Windows on the desktop are just one of many objects used in a graphical user int

ID: 3768741 • Letter: W

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 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 :

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

onCursorFocus -- void-returning and accept no parameters

move -- 3 overloaded methods : both 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-- 2 overloaded methods ; both boolean -returning; one accepts a pair of integer  parameters ; the second a single parameter of type Dimension

Explanation / Answer

interface GUIComponent{

   public void onClick(int x);

   public void onCursorFocus();

   public void onCursorFocus(int number1);

   public abstract boolean move(int number1, int number2);

   public abstract boolean move(Position position);

   public abstract boolean move(Dimension dimension);

   public abstract boolean resize(int number1, int number2);

   public abstract boolean resize(Dimension dimension);

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote