Create an interface called Visible that includes two methods: makeVisible and makeInvisible. Both methods should take no parameters and should return a boolean result. Describe how a class might implement this interface.
What will be an ideal response?
```
public interface Visible
{
public boolean makeVisible();
public boolean makeInvisible();
}
```
A class implementing Visible would include an implements clause in the class header, such as:
public class ControlPanel implements Visible
The class would contain, among other things, two methods with signatures that match those specified in the interface.
You might also like to view...
The operator performs string concatenation.
a. ampersand (&) b. dollar sign ($) c. percent symbol (%) d. pound symbol (#)
Which of the following definitions is the best description of an orphan?
A) The last word of a paragraph split across a line break B) The location of a file preceding the filename C) The last line split from the paragraph across a page break D) The amount of white space around the edge of each page
Built-in text effects in Word can be modified
Indicate whether the statement is true or false
A user recently installed a joystick that is used to play video games on their computer. The user notices that the joystick is slowly drifting. Which of the following should the user do?
A. Replace the device B. Reboot the computer C. Reinstall the drivers D. Recalibrate the device