subject

The following truth table matches which boolean condition? AB?
111
101
010
001
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?
a. compareTo
b. equals
c. indexOf
d. size
e. 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:.
A. Always true
B. Always false
C. True only when x is true and y is true
D. True only when x and y have the same value
E. 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?
A. Bus
B. Car
C. Scooter
D. Train
E. 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?
A. Binary Search
B. Insertion Sort
C. Merge Sort
D. Selection Sort
E. 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?
a. child
b. parent
c. static
d. super
e. this
What two methods from Object are often overridden?
a. add, compareTo
b. add, remove
c. toString, add
d. toString, equals
e. 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");
}
a. I only
b. II only
c. III only
d. I and II
e. I, II and III
The constant in the Integer wrapper class that represents the smallest int value is .
A. MIN
B. MIN_VALUE
C. SMALL_INT
D. SIZE
E. Integer. MAX

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 03:00, Jadaflournoy5
Check my work the microprocessor is a(n) circuit, which is designed to process data based on a set of instructions. most desktop and laptop devices contain a microprocessor based on the standard. most tablets and smartphones contain processors based on technology. a microprocessor's circuitry is designed to perform a limited number of tasks contained in its set. during processing, an instruction is loaded into the processor's unit. data is loaded into registers in the processor's where arithmetic and logic operations are performed. microprocessor performance can be measured by its speed. other factors affecting overall processing performance include word size, cache size, and instruction set complexity. most digital devices contain only one microprocessor chip, but today's multi- processors contain circuitry that supports parallel processing. computers contain various kinds of memory. random memory is a special holding area for data, program instructions, and the system. it stores data on a temporary basis until the processor makes a data request. ram is different from disk storage because it is , which means that it can hold data only when the computer power is turned on. computers also contain read- memory, which is a type of non-volatile memory that provides a set of "hard-wired" instructions, called the loader, that a computer uses to boot up.
Answers: 3
image
Computers and Technology, 22.06.2019 14:30, binodkharal2048
Hi plz 11 ! when planning a table, what step comes first: "define the column headers" or "calculate the number of columns/rows"? a. calculate the number of columns/rows b. define the column headers
Answers: 1
image
Computers and Technology, 22.06.2019 18:30, Liantic8738
List the five on-board vehicle subsystems
Answers: 1
image
Computers and Technology, 24.06.2019 03:30, glitch14
It is not necessary to develop strategies to separate good information and bad information on the internet. true or false
Answers: 1
You know the right answer?
The following truth table matches which boolean condition? AB?
111
101
010
...

Questions in other subjects:

Konu
Mathematics, 19.11.2020 07:40