Answer:
1)
officeAC = new AirConditioner();
officeAC.turnOn();
2)
officeAC = new AirConditioner();
officeAC.turnOn();
officeAC.setTemp(69);
Explanation:
1)
In the first statement a new object of the class AirConditioner whose reference is assigned to the officeAC. new is a keyword which creates an object of the class.
Next statement uses the method turnOn(). Reference to the new object officeAC is used to invoke this method turnOn().
2) The first two statements works the same as in 1)
The last statement invokes a method setTemp() using the reference variable and passes the value 69 to this method to set the desired temperature.
Answer:
SURVEILLANCE-SPECIFIC DESIGN.
Explanation:
Defensible space offers a series of architectural guidelines that can be used in the design of new urban residential complexes to promote both the residential group’s territorial claim to its surroundings and its ability to conduct natural surveillance. The designs are: site interrelationship design, site design, street design and surveillance-specific design.
Surveillance-specific design can be used to increase general visibility by providing adequate lighting, by reducing or eliminating physical barriers to visibility, and by the visibility-promoting location of key areas (entrances, lobbies, elevator waiting areas, parking areas e.t.c.) so as to be directly visible from as many viewpoints as possible.
Since the data center designer requested additional lighting for the entrance to the data center as well as the removal of a object which is blocking security's view of the entrance, then it is an example of SURVEILLANCE-SPECIFIC DESIGN.
Willy Shakespeare has 17 characters. It's higher than 12,so the output will be Too long. Enter a name with fewer than 12 characters.
Letter a.
Answer:
public static void main(String[] args) {
String ing[] = {"ten","fading","post","card","thunder","hinge","trailing","batting"};
for (String i: ing){
if (i.endsWith("ing")){
System.out.println(i);
}
}
}
Explanation:
The for-loop cycles through the entire list and the if-statement makes it so that the string is only printed if it ends with "ing"
Answer:
The statement and the expression is "credits = credits<0?0 : credits;" for the above question.
Explanation:
- The conditional expression is an expression that is used to determine the true and the false case. It works like the if and the else statement.
- It has three parts which are shown above, in which the first part is to check the condition, the second part is excuted if the condition is true and the third part is executed if the condition is false. The variable is used to assign the value.
- If any user provides the credit value and writes the above statement then the credit variable holds 0 for negative value and it holds the original value for any positive or zero value.