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:
Nothing will happen.
Explanation:
The rules written between /* and */ will be ignored because /* and */ are the standard way of writing comment in a style sheet code. So, whatever fall in between them will be ignored during rendering of the page.
Answer: measures how quickly a system performs a process or transaction
Explanation:
Computer performance refers to how well a given computer system performs, which is estimated by its accuracy, efficiency and speed when completing a process or transaction.
A computer performance evaluation will assess a system's resources and outputs to make sure that it´s performing in the best possible way.
Some parameters of performance are latency, speed, throughput, and bandwidth.
Answer:
border: 5px solid lightgreen;
Explanation:
The shorthand version of the border property in CSS goes as follows:
border: <line-width> <line-style> <color>;
With <line-width> represents the thicknes of the border line (expressed in keyword values or lenght values), <line-style> represents the style of the border, and <color> represents the color of the border (in color names or values).
Answer:
a. method body.
Explanation:
A method contains the following components:
- method implementation code
All of these together constitute the method body. The method body contains the declarations and statements constituting the method definition.
Apart from this, when the method is invoked at runtime, it needs to be called with method-name and the actual parameter list which gets substituted for the formal parameters in the method body.