- Study guides, Class notes & Summaries
Looking for the best study guides, study notes and summaries about ? On this page you'll find 15 study documents about .
15 results
Exam (elaborations)
CPS 180 - E2 questions with complete solutions
How many times will the following code print "Welcome to Java"? 
 
int count = 0; 
while (count < 10) { 
 Sln("Welcome to Java"); 
 count++; 
} correct answer: 10 
 
Analyze the following code. 
 
int count = 0; 
while (count < 100) { 
 // Point A 
 Sln("Welcome to Java!"); 
 count++; 
 // Point B 
} 
 
 // Point C correct answer: A. count < 100 is always true at Point A 
 
and 
 
E. count < 100 is always false at Point C 
 
How many times will the following code print "Wel...
Exam (elaborations)
CPS 180 Exam 1 Questions and Answers 2023|Latest Update
PopularCPS 180 Exam 1 Questions and Answers 2023|Latest Update
Exam (elaborations)
CPS 180 EXAM 1
CPS 180 EXAM 1
Exam (elaborations)
CPS 180 Exam 1 Questions and Answers 2024|Latest Update (A+).
CPS 180 Exam 1 Questions and Answers 2024|Latest Update (A+).
Exam (elaborations)
CPS 180 Final questions with complete solutions
One-dimensional array correct answer: A linear collection of items of the same type. 
 
Physical size of an array correct answer: The size of the memory storage allocated in terms of the number of elements that can be held. 
 
Logical size of an array correct answer: The number of elements that are actually stored, which can be any number form 0 up to the physical size 
 
Dimension correct answer: The number of different indexes needed to access an element 
 
Processing array elements in gen...
Exam (elaborations)
CPS 180 Exam 2 pt 1 ch3 Decision structures questions with complete solutions
Write an expression that evaluates to true if and only if the integer x is greater than the integer y. correct answer: (x>y) 
 
Write an expression that evaluates to true if and only if the value of the integer variable x is equal to zero. correct answer: x==0 
 
Write an expression that evaluates to true if and only if the variables profits and losses are exactly equal. correct answer: profits == losses 
 
Write an expression that evaluates to true if the value of index is greater than th...
Exam (elaborations)
CPS 180 Exam 1 Questions With Complete Solutions
What is the output of the following code: 
 
int x = 3; 
int y = 3; 
int z = 3/6; 
Sln(z); correct answer: 0, to fix this z would have to be a double/float and be defined as 3.0/6.0 
 
Create a constant to hold the number of cars in a lot correct answer: final int NUM_CARS; 
 
How do you name constants? correct answer: Put "final" before the variable type, and name the variable in all caps with words separated by underscores. 
 
double correct answer: largest primitive variable type, ho...
Exam (elaborations)
CPS 180 STUDY GUIDE QUESTIONS WITH COMPLETE SOLUTIONS
Architecture Neutral correct answer: Java 
 
The main method header is written as correct answer: public static void main(String[] args) 
 
Statements in java end with correct answer: ; 
 
Programming style is important, because... correct answer: makes a program more readable 
helps reduce programming errors 
 
Forgetting to put closing quotation marks would result in a correct answer: compilation error 
 
program runs fine but gives incorrect result correct answer: logic error 
 
The pub...
Exam (elaborations)
CPS 180 Exam 1 Questions and Answers 2023|Latest Update
CPS 180 Exam 1 Questions and Answers 2023|Latest Update
Exam (elaborations)
CPS 180 Exam 1 Questions and Answers 2023|Latest Update
CPS 180 Exam 1 Questions and Answers 2023|Latest Update
Exam (elaborations)
CPS 180 Exam 1 Questions and Answers 2023/2024|Solutions
CPS 180 Exam 1 Questions and Answers 2023/2024|Solutions
Exam (elaborations)
CPS 180 Exam 1 Questions and Answers 2023/2024|Solutions
CPS 180 Exam 1 Questions and Answers 2023/2024|Solutions
Exam (elaborations)
CPS 180 Exam 1 Questions and Answers 2023/2024|Solutions
CPS 180 Exam 1 Questions and Answers 2023/2024|Solutions
Exam (elaborations)
CPS 180 Exam 1 questions with complete solutions
Keywords correct answer: Lower case words reserved by java (can't be identifiers) 
ex: public, static, class, void 
 
Expressions correct answer: a part of a statement (like a clause) 
 
Statements (source code) correct answer: a complete java instruction that causes the computer to perform an action 
 
The name of the .java source code correct answer: must match the name of the class 
 
Bytecode correct answer: what java compiles to so the virtual machine interprets and runs 
 
WORM langu...
Exam (elaborations)
CPS180 Chapter 8 Quiz Questions With Complete Solutions
int[][]values = {{3,4,5,1},{33,6,1,2}}; 
 
 int v=values[0][0]; 
 for(int[] list: values) 
 for(int element: list) 
 if (v>element) 
 v=element; 
 S(v); correct answer: 1 
 
How many elements are array matrix (int[][] matrix = new int[5][5])? correct answer: 25 
 
Which of the following statements are correct? correct answer: char[][] charArray = {{'a', 'b'}, {'c', 'd'}}; 
 
What is the index variable for the element at the first row and first column in array a? correct answer: a...