Answer:
import java.util.Scanner;
public class num12 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter the first String");
String word1 = in.nextLine();
System.out.println("Enter the second String");
String word2 = in.nextLine();
System.out.println("Enter the third String");
String word3 = in.nextLine();
//Remove all white spaces
String cword1 = word1.replace(" ","");
String cword2 = word2.replace(" ","");
String cword3 = word3.replace(" ","");
//Comparing the string by their lengths
if(cword1.length()>cword2.length()&&cword1.length()>cword3.length()){
System.out.println(word1+" Is the longest");
}
else if(cword2.length()>cword1.length()&&cword2.length()>cword3.length()){
System.out.println(word2+" Is the longest");
}
else{
System.out.println(cword3+" Is the longest");
}
}
}
Explanation:
Using Java Programming Language
Use the Scanner Class to obtain the String values from the user
Save them in different variables
Use the replace() method in java to remove white space from any of the string entered
Using if and else statements compare the lengths of the strings (word.length()) returns the length of the word.
Print out the word that is longest
NOTE I have compared three Strings, comparing two would have been more straigth forward
Answer:
I THINK FALSE
Explanation:
The teacher is violating the Standard 1.2 in the education section.
The standard states that any educator shall not knowingly misappropriate or use monies, personnel, property, or equipment committed to his or her charger for personal gain or advantage.
Hence, because of this, the teacher has violated the Standard 1.2 in the education section.
Read more about Standard 1.2
#SPJ2
Answer:
The teacher is most likely violating the District Use Policy.
Answer:
A. placing a found virus in a secure area on the hard drive
Explanation:
When a file is defected in a computer, quarantining is applied to prevent other parts of the computer. The infected file is isolated and if you let your antivirus software, it can delete the infected file.
(B) Man-in-the-middle attack
(C) Smurf attack
(D) Format string attack
(E) Denial of service attack
Answer:D)Format string attack
Explanation:
Format string attack is the type of attack that causes to change the application functioning .This attack access the memory of the string library. It occurs while the submission of the string as input and then gets tested due to application command.
Other options are incorrect because these are the attacks that don't happens in the application for the alteration of the flow. Thus, the correct option is option(D).
Answer:
These all are constructors.
CONS
(CONS A B)
makes a pair like this: (A . B)
In other words, A is the CAR of the pair; B is the CDR of the pair.
For example:
(CONS 4 5) ==> (4 . 5)
(CONS 4 '(5 6)) ==> (4 5 6)
[The pair (4 . (5 6)) is the same thing as (4 5 6)].
APPEND
(APPEND A B)
makes a new list by replacing the final nil in A with the list B. A and
B must be proper lists.
For example:
(APPEND '(4) '(5 6)) ==> (4 5 6)
This takes any amount of number and put in this order
LIST
In this ,it will return a list whose elements are value of arguments in the order as it appeared in the LIST.It can take any amount of parameters
For example,
(LIST 4) ==> (4)
(LIST 4 5) ==> (4 5)
(LIST 4 5 '(6 7)) ==> (4 5 (6 7))
(LIST (+ 5 6)(* 5 6)) ==> (8 9)