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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Your task this week is to write a very simple spam classifier in python. it will classify messages as either spam (unwanted) or ham (wanted). the program will have a set of spam_words, words that are known to appear in spam messages. that set is included in the template file spam.pypreview the document. you will also define a spam threshold which reflects the allowed percentage of spam words in the message. you'll compute a 'spam indicator', which is the ratio of spam words to the total number of unique words in the message. if the spam indicator exceeds the spam threshold, the message is classified as spam. otherwise it is classified as ham. we'll assume that the spam threshold is a constant and has a value of 0.10. your program will prompt the user for a message and then will print the corresponding spam indicator with two decimal digits and the corresponding classification (spam or ham). the program will be case insensitive. the spam words are detected whether they are in lower case or upper case or mixed case. each word, spam or not, is counted once (even if it appears multiple times in the message.) the program will remove punctuation from the message before identifying the words and computing the spam indicator. for example '! ' must be identified as the spam word 'now'.
Answers: 3
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
This chapter lists many ways in which becoming computer literate is beneficial. think about what your life will be like once you’re started in your career. what areas of computing will be most important for you to understand? how would an understanding of computer hardware and software you in working from home, working with groups in other countries and contributing your talents.
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
You know the right answer?
The following truth table matches which boolean condition? AB?
111
101
010
...
Questions
question
Spanish, 09.10.2019 02:30
question
Mathematics, 09.10.2019 02:30
question
Mathematics, 09.10.2019 02:30
Questions on the website: 13722365