Answer:
import java.awt.Point;
public class Line{
private Point point1, point2;
public Line(Point p1, Point p2){
point1 = p1;
point2 = p2;
}
public Point getP1(){
return point1;
}
public Point getP2(){
return point2;
}
public String toString(){
return "[( The " + point1.x + "," + point1.y + "), (" + point2.x + "," + point2.y +")]";
}
public static void main(String args[]){
Line lineObj = new Line(new Point(7,9), new Point(6,2));
System.out.println(lineObj.toString());
}
}
Explanation:
- Declare the points inside the class Line.
- Initialize the getters and setters method for the class.
- Define a toString method that returns the information in a formatted manner.
- Inside the main method, initialize an object with some values.
- Display the information by calling the toString method.
Answer:
The correct answer to the following question will be "True".
Explanation:
The "kernel" as shown at the core of your OS would be the central machine program. The program facilitates the essential functions of a computer processor, including coordinating activities, executing programs, and managing devices. This allows users to define a series of directions to try to resolve the connections to running program files in an order of preference.
So, the given statement is true.
Answer:B) Archives/backups
Explanation: Archive is the group of records of data that are saved for the future use.These are the historic data that is not currently used in the actual location .
Backup is the the the copy of the group of data that is not in the original form to be used in future. Thus the correct option is option(B).
Updating of the plans by the technician cannot be done through other given options because they don't hold the historic records of the data for the renewing of the plans.
Answer:
The code commented is given below, also the lines that start with # are comments that explains the code.
# Create a function named times_print that receives 2 values x and y
def times_print(x, y):
# Print the formatted string
print("The value of {} times {} is {}".format(x,y,x*y))
# Create the main function
def main():
# Call the funciton times_print 3 times with different values
times_print(2,3)
times_print(4,5)
times_print(5,6)
# Execute the main function
main()
Explanation:
The code was written using Python 3.5, and here I attach the screenshots of the program running: