The following truth table matches which boolean condition?
A B ?
1 1 1
1...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 13.03.2020 17:09 rederisbetter7637
The following truth table matches which boolean condition?
A B ?
1 1 1
1 0 1
0 1 0
0 0 1
A && ( A || B)
A || ( !A && !B)
A && ( A && B)
!A && ( A || !B)
A || ( A || B)
Consider the following class:
public class Thingy implements Comparable {
private int val;
public Thingy() {
this(0);
}
public Thingy(int t) {
val = t;
}
}
Which of the following methods must be included so this class can be instantiated?
compareTo
equals
indexOf
size
toString
Assume that x and y are boolean variables and have been properly initialized.
(x || y) && !(x && y)
The result of evaluating the expression above is best described as
Always true
Always false
True only when x is true and y is true
True only when x and y have the same value
True only when x and y have different values
You have created the following set of classes: Bus, Car, Scooter, Train, and Vehicle. Which would you choose to be the abstract class?
Bus
Car
Scooter
Train
Vehicle
Consider the method definition:
public static String analyzeTemps(int temps [], int avg) {
int above = 0;
int below = 0;
for(int i =0; i < temps. length; i++) {
if (temps[i] > avg)
above++;
if (temps[i] < avg)
below++;
}
if (above > below)
return "Hotter than normal";
if (above < below)
return "Cooler than normal";
return "Temperatures normal";
}
What is returned by the following?
int temps [] = {82 , 73 , 77 , 79 , 86 , 88 , 76 , 78 , 83};
System. out. println(analyzeTemps(temps, 81));
4
5
Cooler than normal
Hotter than normal
Temperatures normal
Consider the following code:
int list [] = /* missing code */;
int val = /* missing code */;
int n = -1;
for (int i = 0; i < list. length; i++) {
if (val == list[i]) {
n = i;
break;
}
}
What algorithm is shown?
Binary Search
Insertion Sort
Merge Sort
Selection Sort
Sequential Search
Suppose a child class has overridden a method of its parent class. What key word does the child class use to access the method in the parent class?
child
parent
static
super
this
What two methods from Object are often overridden?
add, compareTo
add, remove
toString, add
toString, equals
toString, compareTo
Consider the following class:
public class FrozenDesert{
public FrozenDesert() {
System. out. println("Yum");
}
}
You write a class, FrozenYogurt, which extends FrozenDesert. Which of the following is a correct implementation of the constructor for FrozenYogurt?
I.
public FrozenYogurt() {
System. out. println("I'm the new ice cream");
super();
}
II.
public FrozenYogurt() {
super();
System. out. println("I'm the new ice cream");
super();
}
III.
public FrozenYogurt() {
super();
System. out. println("I'm the new ice cream");
}
I only
II only
III only
I and II
I, II and III
The constant in the Integer wrapper class that represents the smallest int value is .
MIN
MIN_VALUE
SMALL_INT
SIZE
Integer. MAX
![ansver](/tpl/images/cats/User.png)
Answers: 2
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 07:00
Why do we mark tlc plates with pencil and not with pen
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 12:40
Match the feature to the network architecture. expensive to set up useful for a small organization easy to track files has a central server inexpensive to set up difficult to track files useful for a large organization does not have a central server client- server network peer-to-peer network
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 15:00
In excel, what happens to the cell contents when you click and drag a cell into multiple cells?
Answers: 1
You know the right answer?
Questions
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/en.png)
English, 18.02.2020 18:36
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 18.02.2020 18:36
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/health.png)
Health, 18.02.2020 18:36
![question](/tpl/images/cats/es.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/User.png)