A shell function will do nothing unless it is explicitly called by other code, typically in a shell script. A shell script is a running executable process, which can call other shell scripts and/or functions. Typical operations performed by shell scripts include file manipulation, program execution, and printing text.
Answer:
1. accessing content from some knowledge base.
2. picking words and connecting them to form sentences.
3. setting the tone and style of the sentence.
4. mapping the sentence plan into sentence structure.
Explanation:
Natural language generation can be defined as a part of artificial intelligence (AI) which typically involves developing responses by an AI in order to enable the computer engage in a useful conversation.
This ultimately implies that, the computer has to generate meaningful data (phrases and sentences) from the internal database.
Basically, the steps involved in natural language generation in a chronological order are listed below;
1. Text planning: accessing content from some knowledge base.
2. Picking words and connecting them to form sentences
3. Sentence planning: setting the tone and style of the sentence.
4. Text realization: mapping the sentence plan into sentence structure.
Answer:
Previous decisions were flawed
Explanation:
An algorithm depends entirely on the data input into the system in the decision making process.
As such, when there are conclusions in the data set used by the algorithm for decision making which are distorted, such as the association of less individuals that drink and drive in the rich cities than can be found in poorer communities due to the presence of less bars uptown and as such drivers from uptown areas are given preference may include a bias that is due to conclusion on which the previous decisions were made and used in the algorithm which may have been flawed or need more detailed analysis
A compiler, which has several parts, translates source code to executable code.
Answer:
<u>Window.java</u>
- public class Window {
- int width;
- int height;
-
- public Window(int width, int height){
- this.width = width;
- this.height = height;
- }
- public int getWidth(){
- return width;
- }
- public int getHeight(){
- return height;
- }
-
- public int getClientAreaHeight(){
- return getHeight();
- }
- }
<u>Main.java</u>
- public class Main {
- public static void main (String [] args) {
- Window win1 = new Window(12, 15);
- System.out.println(win1.getClientAreaHeight());
- }
- }
Explanation:
<u>Window.java</u>
There is a Window class with two int type attributes, width and height (Line 1 - 3).
The constructor of this class will take two inputs, width and height and set these input to its attributes (Line 5 - 8). There are two methods getWidth and getHeight which will return the value of attributes width and height, respectively (Line 10 - 16).
The required new method getClientAreaHeight is defined in line 18 -20. This method will call the getHeight method to return the height value of the window (Line 19).
<u>Main.java</u>
We test the Window class by creating one Window instance and call the getClientAreaHeight method and print the return output (Line 1 -6).
We shall see 15 is printed.