SPRING 2020 CSIS 212-B01 LUO • Question 1 3 out of 3 points Which software product release category is "generally feature complete and supposedly bug free, and ready for use by the community... ?" • Question 2 3 out of 3 points Which of the following statements is false? • Question 3 3 out of 3 points Which of the following statements is false? • Question 4 0 out of 3 points Which of the following statements is false? • Question 5 3 out of 3 points Which of the following statements is false? • Question 6 3 out of 3 points ________ involves reworking programs to make them clearer and easier to maintain while preserving their correctness and functionality. • Question 7 3 out of 3 points ________ models software in terms similar to those that people use to describe real-world objects. • Question 8 3 out of 3 points Which of the following statements is true? • Question 9 3 out of 3 points All import declarations must be placed • Question 10 3 out of 3 points Which of the following is a variable declaration statement? • Question 11 0 out of 3 points Which of the following does not contain a syntax error? • Question 12 3 out of 3 points Which of the following statements does not alter the value stored in a memory location? • Question 13 3 out of 3 points Each of the following is a relational or equality operator except: • Question 14 3 out of 3 points When method printf requires multiple arguments, the arguments are separated with ________. • Question 15 3 out of 3 points Which of the following cannot cause a syntax error to be reported by the Java compiler? • Question 16 3 out of 3 points Which of the following statements would display the phase Java is fun? • Question 17 3 out of 3 points Which of the following statements is false? • Question 18 3 out of 3 points Floating-point literals are of type ________ by default. • Question 19 3 out of 3 points An import declaration is not required if you always refer to a class with its ________ name, which includes its package name and class name. • Question 20 3 out of 3 points Which of the following statements is true? • Question 21 3 out of 3 points Which of the following statements is false? • Question 22 3 out of 3 points The format specifier %.2f specifies that two digits of precision should be output ________ in the floating-point number. • Question 23 3 out of 3 points Types in Java are divided into two categories. The primitive types are boolean, byte, char, short, int, long, float and double. All other types are ________ types. • Question 24 3 out of 3 points Java requires a ________ call for every object that’s created. • Question 25 3 out of 3 points Which of the following statements about the conditional operator (?:) is false? • Question 26 3 out of 3 points What is the size in bits of an int? Selected Answer: 32 • Question 27 3 out of 3 points Which primitive type can hold the largest value? • Question 28 0 out of 3 points Which of the following statements is true? • Question 29 3 out of 3 points How many times is the body of the loop below executed? int counter = 1; while (counter > 20) { // body of loop counter = counter - 1; } • Question 30 3 out of 3 points Which of the following is not a primitive type? • Question 31 3 out of 3 points Which statement is true? Selected Answer: All of the above. 24.Which of the following terms is not used to refer to a sentinel value that breaks out of a while loop? a. signal value. *b. maximum value. c. dummy value. d. flag value. • Question 32 3 out of 3 points Which of the following is not an algorithm? • Question 33 3 out of 3 points Consider the classes below: public class TestA { public static void main(String[] args) { int x = 2; int y = 20 int counter = 0; for (int j = y % x; j < 100; j += (y / x)) { counter++; } } } public class TestB { public static void main(String[] args) { int counter = 0; for (int j = 10; j > 0; --j) { ++counter; } } } Which of the following statements is true? • Question 34 0 out of 3 points Which of the following for-loop headers results in equivalent numbers of iterations: • Question 35 3 out of 3 points Which expression is equivalent to if (!(grade == sentinelValue))? • Question 36 3 out of 3 points Which of the following statements is true? • Question 37 3 out of 3 points Consider the following two Java code segments: Segment 1 Segment 2 int i = 0; for (int i = 0; i <= 20; i++) { while (i < 20) { System.out.println(i); i++; } System.out.println(i); } Which of the following statements are true? • Question 38 3 out of 3 points The control variable of a counter-controlled loop should be declared as ________to prevent errors. • Question 39 3 out of 3 points For the code segment below: switch(q) { case 1: System.out.println("apple"); break; case 2: System.out.println("orange"); break; case 3: System.out.println("banana"); break; case 4: System.out.println("pear"); case 5: System.out.println("grapes"); default: System.out.println("kiwi"); } Which of the following values for q will result in kiwi being included in the output? • Question 40 3 out of 3 points Which case of the following would warrant using the boolean logical inclusive OR (|) rather than the conditional OR (||)? • Question 41 3 out of 3 points Which of the following can be used in a switch statement in the expression after keyword case? • Question 42 3 out of 3 points Consider the code segment below. if (gender == 1) { if (age >= 65) { ++seniorFemales; } } This segment is equivalent to which of the following? • Question 43 3 out of 3 points Which of the following is not a type of iteration statement in Java? • Question 44 3 out of 3 points Which of the following statements about a do…while iteration statement is true? • Question 45 3 out of 3 points Which of the following statements about the switch statement is false? • Question 46 3 out of 3 points Which statement below is false? • Question 47 3 out of 3 points Which of the following will not help prevent infinite loops? • Question 48 3 out of 3 points For the two code segments below: Segment A int q = 5; switch(q) { case 1: System.out.println(1); case 2: System.out.println(2); case 3: System.out.println(3); case 4: System.out.println(4); case 5: System.out.println(5); default: System.out.println("default"); } Segment B q = 4; switch(q) { case 1: System.out.println(1); case 2: System.out.println(2); case 3: System.out.println(3); case 4: System.out.println(4); case 5: System.out.println(5); default: System.out.println("default"); } Which of the following statements is true? • Question 49 3 out of 3 points Which of the following statements about the continue statement is true? • Question 50 3 out of 3 points Which statement prints the floating-point value 123.456 right justified with a field width of 10? [Show More]
Last updated: 2 years ago
Preview 1 out of 12 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Oct 17, 2020
Number of pages
12
Written in
This document has been written for:
Uploaded
Oct 17, 2020
Downloads
0
Views
134
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·