Answer:
a) "Quit"
c) "Q only
Explanation:
Given
<em>String s = "Go"; </em>
<em>while ((!s.equals("q"))&& (!s.equals(""))) {</em>
<em>System.out.println("In loop"); </em>
<em>s = scnr.next();</em>
<em>}</em>
<em />
Required
What input causes another execution
Analyzing the while condition
<em>while ((!s.equals("q"))&& (!s.equals(""))) </em>
<em />
This can be split into:
<em>!s.equals("q")) && (!s.equals(""))</em>
<em />
Meaning
When s is not equal to "q" and when s is not an empty string
<em />
In other words,
the loop will be executed when user input is not "q" and user input is not empty.
So, from the list of given options: The loop both will be executed when:
a) Input is "Quit"
c) Input is Q only
<em>Input of q will terminate the loop, hence b and d are incorrect</em>
<em />
Answer:
Explanation:
A computer system can interact with its environment using hardware that does so such as cameras, robotic arms, thermometers, smart devices etc. These hardware devices gather information from the environment and transfer it to the computer system in a format known as bits through binary electrical impulses. If the system is designed to be autonomous then the only human interaction needed would be the initial setup of the system and its hardware, once this is done the system does not need any more human interaction as long as nothing breaks.