Shared Flashcard Set

Details

CMSC Midterm II
vocab stuff
30
Computer Science
Undergraduate 1
05/12/2013

Additional Computer Science Flashcards

 


 

Cards

Term
find random int on a range
Definition
return (int)(Math.random()*(hi-lo+1))+lo;
Term
array declaration
Definition
int [] a = new int[7];
Term
zero-based indexing
Definition
starts with array[0] not array[1]
Term
text file
Definition
ASCII file (.txt)
Term
next token
Definition
data from position to next whitespace
Term
public
Definition
method can be called from all other classes
Term
static
Definition
method can be called without creating an instance of the class
Term
void method
Definition
doesn't return anything (achieves side effect)
Term
formal parameters
Definition
names from method declaration
Term
actual parameters
Definition
values from calling method
Term
pass-by-value
Definition
copy is made of actual parameter (happens with individual values, not arrays)
Term
scope of local variable
Definition
the lexical/textual region of a program where a variable can be referenced
Term
lexical/static scoping
Definition
scope can be determined just by looking at the program
Term
local variable
Definition
variable is declared inside of method
Term
local to loop
Definition
variable is declared in the loop header
Term
method signature
Definition
method name + parameter profile
Term
overloaded method
Definition
multiple definitions with the same name but different parameter profiles
Term
ambiguous invocation
Definition
not possible to determine specific method, equally specific methods match the call
Term
implicit casting
Definition
widen variable type, like from int (or w/e) to double
Term
arity
Definition
the number of arguments that a method accepts
Term
method abstraction
Definition
separating method interface and implementation
Term
interface
Definition
what goes in/out, what caller uses
Term
implementation
Definition
how it works, what developers of method write
Term
row-major form
Definition
a[row][column]
Term
multidimensional array
Definition
array within array
Term
ragged array
Definition
multidimensional array with varying array lengths inside outer array
Term
Math.round();
Definition
rounds to nearest int, if halfway goes to even (returns integer)
Term
how to import text file
Definition
import java.util.Scanner;

public static blahblakdfb throws Exception
java.io.File file=new java.io.File("scores.txt");
Scanner input = new Scanner(file);
blahldfahbl;
input.close();
Term
overloaded operators (+)
Definition
+=addition of ints, doubles, concatenation of strings
Term
declare (rectangular) array
Definition
int [][] a = new int [3][5];
Supporting users have an ad free experience!