Question
Code an interface named GUIComponent specifying three methods: a void-returning method named display that accepts no parameters a void returning method named setVisible that accepts
Code an interface named GUIComponent specifying three methods:
a void-returning method named display that accepts no parameters
a void returning method named setVisible that accepts a boolean
a boolean returning method named isVisible that that accept no parameters
The name of your interface should be GUIComponent.
Your class is tested by a GUIComponentApp class, and a MinGUIComponent class that is a minimal implementation of the interface. (GUIComponent objects can't be created since it's an interface, however, classes implementingGUIComponent 'are' (in the is-a sense) GUIComponents and thus the interface can be tested by coding such a class and creating it's objects.) This is for informational purposes only and does not affect your coding of the interface. The only thing you should be submitting is the code for GUIComponent.
Here is the expected output of the GUIComponentApp application:
Creating a MinGUIComponent and displaying -- initial state -- visible=false Setting visible to true and displaying ... . . ...
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started