1/100
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
computer systems
consist of hardware and software
program
a set of instructions for the computer to carry out
software
all the different kinds of programs used to give instructions to the computer
CPU (processor)
the device inside your computer that follows a program's instructions
memory
holds data for the computer to process, and holds the result of the computer's intermediate calculations
main memory (RAM)
volatile memory that holds the current program and much of the data that the program is manipulating; 100,000x faster than auxiliary memory;
auxiliary memory (secondary memory)
non-volatile memory that continues to exist when the computer's power is off.
byte
the smallest addressable unit of memory; consists of 8 bits
memory location
the address of adjacent bytes
operating system
a supervisory program that oversees the entire operation of the computer
high-level languages
must be translated into a language that the computer hardware can understand; typically easy to understand and write; (ex: Java)
machine language
the language that the computer can directly understand
assembly language
a symbolic form of machine language that is easier for people to read
low-level languages
only needs minor translation before it can be run on the computer
compiler
a program that translates a high-level language to a low-level language;
Java compiler
translates the Java language (high-level) into Java bytecode (low-level)
Java bytecode
a 'machine language' for a hypothetical virtual computer known as the Java Virtual Machine
Java Virtual Machine (JVM)
an interpreter that is responsible for translating Java bytecode into machine language and running the code
class loader
connects bytecode of various classes
applets
little applications meant to be sent to another location on the Internet and run there
statements
instructions within a method that define a task and make up the body of the method
variables
used in a program to store data such as numbers and letters; assigned a memory location
data type
specifies a set of possible values and the operations defined for those values
syntax
the grammatical rules for writing computer languages
value
the number, letter, or other data item inside a variable
variable declaration
includes a type name, & a variable name, and ends with a semicolon;
primitive type
variables of this type are more simple than objects, and hold data of several specified types
byte (type)
Primitive type:
Integer
-128 to 127
[1 byte]
short (type)
Primitive type:
Integer
-32,768 to 32,767
[2 bytes]
int (type)
Primitive type:
Integer
-2,147,483,648 to 2,147,483,647
[4 bytes]
long (type)
Primitive type:
Integer
[8 bytes]
float (type)
Primitive type:
Floating-point
[4 bytes]
double (type)
Primitive type:
Floating-point
[8 bytes]
char (type)
Primitive type:
Single character
[2 bytes]
boolean (type)
Primitive type:
true/false
[1 bit]
floating-point number
A number having a fractional part, such as 2.5
identifier
the name of a variable in Java; can only contain letters, digits, and underscore
assignment statement
A statement that assigns a particular value to a variable
assignment operator
=
constants (literals)
a variable that does not change in value
byte, short, int, long, float, double
type the order of primitive type assignment compatibility, left to right, with commas:
typecasting
changes the data type of a value from its normal type to some other type; truncates if going backwards in assignment compatibility
unary operator
an operator that only has one operand; + - ++ -- !
binary operator
an operator that has two operands; * / + -
highest precedence (operators)
unary operators (+ - ++ -- !)
[precedence?]
second highest precedence (operators)
binary arithmetic operators (* / %)
[precedence?]
lowest precedence (operators)
binary arithmetic operators (+ -)
[precedence?]
concatenation
an operation to combine strings; uses +
index
the position in a string or array
substring
a portion of a string
escape characters
special characters indicated with a backslash (\n, \t)
delimiters
specified characters (usually whitespace) that separate multiple inputs in a Scanner class
boolean expression
an expression that is evaluated as either true or false
conditional operator
?; used with the ternary operator : to assign a value; can replace an if-else statment
short-circuit evaluation
an evaluation made when Java only evaluates the beginning of an expression to determine if it is true or false. Use & and | instead of && and || to avoid
loop
a portion of a program that repeats a group of statements
iteration
one repetition of the loop body
while loop
a type of loop that repeats its body while the controlling expression is true (can preform 0 iterations)
do-while loop
a type of loop that repeats its body the controlling expression is true (body is always executed at least once)
infinite loop
a loop that iterates its body without ever ending
for loop
a loop that uses 3 expressions in its implementation to iterate the loop a specified number of times; used to count up or down
for each loop
a for loop that uses : to iterate over each value in an array
local variable
a variable that only has meaning inside the body it is declared in
scope
the portion of a program in which a variable has meaning
sentinel value
a value that a user can input to signal the end of a loop/input
object
an instance of a class
class
specifies the attributes/data (instance variables) that objects have
UML Class Diagram
a diagram designed to help outline a class
instance variables
the data items that belong to an object;
public
an access modifier that places no restrictions on how instance variables are used
methods
invoked or called to perform actions on an object; some return a value and some are void
void methods
methods that perform some action other than returning a value
return;
the line used in a non-void method to give back a value where it was called; ends a method's execution
this
the keyword used as a name for the receiving object in a method
block
a compound statement that declares a local variable
formal parameters
in a method, these parameters represent the actual argument in the method definition
actual parameters
in a method, these parameters represent the argument, or the value that is plugged into the method
byte, short, int, long, float, double
the order that automatic typecasting occurs in:
information hiding (abstraction)
designing a method so that it can be used without much understanding; separating the why from the how
precondition statement
a comment that states the conditions that must be true before a method is invoked
postcondition statement
a comment that describes all the effects produced by a method invocation
private
an access modifier that makes something inaccessible outside of the method it is declared in; instance variables should always be this
accessor method (getter)
a method that allows you to look at data contained in an instance variable
mutator method (setter)
a method that allows you to change the data stored in private instance variables
encapsulation
the process of hiding all the details of a class definition that are not necessary to understanding how objects of the class are used
implementation
the _____ of a class consists of all the private and public elements/methods of the class
+ (UML)
signifies public in a UML Diagram
- (UML)
signifies private in a UML Diagram
reference
the address of a memory location is a _____ to the object
reference type (class type)
a type whose variables hold references as opposed to actual values of objects
constructor
a special method that is called using the new operator; can initialize instance variables to your specifications
default constructor
a constructor with no defined parameters; must be included if another constructor is defined
static variable
belongs to a class as a whole and not an individual object; objects share this constant
final
this modifier prevents a static variable from being changed
local, instance, static
Java variable types:
static methods
methods that perform actions unrelated to an object; invoked using the class name; cannot reference an instance variable
wrapper class
these special classes convert each primitive type to a class type; Integer n = new Integer(42);
boxing
the automatic conversion/type casting from a primitive type to its corresponding class; Integer n = 42;
unboxing
the automatic conversion of an object of a wrapper class to a value of its associated primitive type; int i = n;
array
a collection of items of the same type