Shared Flashcard Set

Details

Comp sci midterm 1
random vocab for first test of intro comp sci course
30
Computer Science
Undergraduate 1
04/21/2013

Additional Computer Science Flashcards

 


 

Cards

Term
IDE
Definition
Integrated Development Environment (e.g. Netbeans)1
Term
identifiers
Definition
names in a programming language (e.g. variables, class names, method names)
Term
assignment statements
Definition
variable = value
Term
concatenate
Definition
string/glue together (use '+')
Term
next line convention
Definition
give curly braces their own lines
(as opposed to end-of-line style)
Term
boolean
Definition
either true or false
(a boolean expression can also be called condition, conditional expression, binary expression)
Term
relational operators
Definition
return true or false but the operands are not boolean
(aka Java comparison operators)
ex: ==, <, >=
Term
boolean operators
Definition
return true or false and the operands are both boolean values
(aka logical operators)
ex: &&, ||, !
Term
control statements
Definition
statements that control the next step the program will take
Term
sequential control
Definition
straight line, step-by-step
Term
conditional control
Definition
branching (ex if, if-else, switch)
Term
iterative control
Definition
looping (ex while, do for)
Term
infinite loops
Definition
variable doesn't change/stop, so the loop goes continuously
Term
fencepost error
Definition
loop goes one too many/few times, caused by using the wrong bounds
Term
dependent nested for loop
Definition
loop within loop & inner loop depends on outer
Term
how to do console input
Definition
variable varName = console.readInt("lbahe: ");
Term
how to make a variable a constant
(also what case should constant be?)
Definition
final double PI = 3.14159
SHOULD_BE_CAPS
Term
compiler
Definition
translates written code into something computer can read
Term
three types of errors
Definition
syntax, semantics (runtime & logic)
Term
syntax errors
Definition
error in the grammar of the program (e.g. forgot a semicolon)
Term
runtime error
Definition
causes program to abort
Term
logic error
Definition
program works but produces the incorrect result
Term
numerical data types in order of big to small
Definition
byte, short, int, long
(floating:) float, double
Term
how to do exponents
Definition
(a=x^y)
a = Math.pow(x,y);
Term
post-increment vs pre-increment
Definition
post: i++, evaluate with old value, then change i
pre: i--, update i before preforming expression
Term
System.out.printf("%4.2f", var);
Definition
%=start here
4=width of thingy
.2=precision of thingy
var= variable
Term
casting double as int
Definition
double someVar = 12.3;
int otherVar = (int)someVar;
Term
continue and break
Definition
don't use 'em unless for switch statement
Term
how to import scanner
Definition
import java.util.Scanner;

Scanner scan = new Scanner(System.in);
System.out.print("ENter: ");
int heyThere = scan.nextInt();
Term
assignment vs comparison
Definition
assignment defines as new thing, comparison compares them like in if statement doesn't give new def.
Supporting users have an ad free experience!