CSCI 1301 Final Exam

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/100

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

101 Terms

1
New cards

computer systems

consist of hardware and software

2
New cards

program

a set of instructions for the computer to carry out

3
New cards

software

all the different kinds of programs used to give instructions to the computer

4
New cards

CPU (processor)

the device inside your computer that follows a program's instructions

5
New cards

memory

holds data for the computer to process, and holds the result of the computer's intermediate calculations

6
New cards

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;

7
New cards

auxiliary memory (secondary memory)

non-volatile memory that continues to exist when the computer's power is off.

8
New cards

byte

the smallest addressable unit of memory; consists of 8 bits

9
New cards

memory location

the address of adjacent bytes

10
New cards

operating system

a supervisory program that oversees the entire operation of the computer

11
New cards

high-level languages

must be translated into a language that the computer hardware can understand; typically easy to understand and write; (ex: Java)

12
New cards

machine language

the language that the computer can directly understand

13
New cards

assembly language

a symbolic form of machine language that is easier for people to read

14
New cards

low-level languages

only needs minor translation before it can be run on the computer

15
New cards

compiler

a program that translates a high-level language to a low-level language;

16
New cards

Java compiler

translates the Java language (high-level) into Java bytecode (low-level)

17
New cards

Java bytecode

a 'machine language' for a hypothetical virtual computer known as the Java Virtual Machine

18
New cards

Java Virtual Machine (JVM)

an interpreter that is responsible for translating Java bytecode into machine language and running the code

19
New cards

class loader

connects bytecode of various classes

20
New cards

applets

little applications meant to be sent to another location on the Internet and run there

21
New cards

statements

instructions within a method that define a task and make up the body of the method

22
New cards

variables

used in a program to store data such as numbers and letters; assigned a memory location

23
New cards

data type

specifies a set of possible values and the operations defined for those values

24
New cards

syntax

the grammatical rules for writing computer languages

25
New cards

value

the number, letter, or other data item inside a variable

26
New cards

variable declaration

includes a type name, & a variable name, and ends with a semicolon;

27
New cards

primitive type

variables of this type are more simple than objects, and hold data of several specified types

28
New cards

byte (type)

Primitive type:
Integer
-128 to 127
[1 byte]

29
New cards

short (type)

Primitive type:
Integer
-32,768 to 32,767
[2 bytes]

30
New cards

int (type)

Primitive type:
Integer
-2,147,483,648 to 2,147,483,647
[4 bytes]

31
New cards

long (type)

Primitive type:
Integer
[8 bytes]

32
New cards

float (type)

Primitive type:
Floating-point
[4 bytes]

33
New cards

double (type)

Primitive type:
Floating-point
[8 bytes]

34
New cards

char (type)

Primitive type:
Single character
[2 bytes]

35
New cards

boolean (type)

Primitive type:
true/false
[1 bit]

36
New cards

floating-point number

A number having a fractional part, such as 2.5

37
New cards

identifier

the name of a variable in Java; can only contain letters, digits, and underscore

38
New cards

assignment statement

A statement that assigns a particular value to a variable

39
New cards

assignment operator

=

40
New cards

constants (literals)

a variable that does not change in value

41
New cards

byte, short, int, long, float, double

type the order of primitive type assignment compatibility, left to right, with commas:

42
New cards

typecasting

changes the data type of a value from its normal type to some other type; truncates if going backwards in assignment compatibility

43
New cards

unary operator

an operator that only has one operand; + - ++ -- !

44
New cards

binary operator

an operator that has two operands; * / + -

45
New cards

highest precedence (operators)

unary operators (+ - ++ -- !)
[precedence?]

46
New cards

second highest precedence (operators)

binary arithmetic operators (* / %)
[precedence?]

47
New cards

lowest precedence (operators)

binary arithmetic operators (+ -)
[precedence?]

48
New cards

concatenation

an operation to combine strings; uses +

49
New cards

index

the position in a string or array

50
New cards

substring

a portion of a string

51
New cards

escape characters

special characters indicated with a backslash (\n, \t)

52
New cards

delimiters

specified characters (usually whitespace) that separate multiple inputs in a Scanner class

53
New cards

boolean expression

an expression that is evaluated as either true or false

54
New cards

conditional operator

?; used with the ternary operator : to assign a value; can replace an if-else statment

55
New cards

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

56
New cards

loop

a portion of a program that repeats a group of statements

57
New cards

iteration

one repetition of the loop body

58
New cards

while loop

a type of loop that repeats its body while the controlling expression is true (can preform 0 iterations)

59
New cards

do-while loop

a type of loop that repeats its body the controlling expression is true (body is always executed at least once)

60
New cards

infinite loop

a loop that iterates its body without ever ending

61
New cards

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

62
New cards

for each loop

a for loop that uses : to iterate over each value in an array

63
New cards

local variable

a variable that only has meaning inside the body it is declared in

64
New cards

scope

the portion of a program in which a variable has meaning

65
New cards

sentinel value

a value that a user can input to signal the end of a loop/input

66
New cards

object

an instance of a class

67
New cards

class

specifies the attributes/data (instance variables) that objects have

68
New cards

UML Class Diagram

a diagram designed to help outline a class

69
New cards

instance variables

the data items that belong to an object;

70
New cards

public

an access modifier that places no restrictions on how instance variables are used

71
New cards

methods

invoked or called to perform actions on an object; some return a value and some are void

72
New cards

void methods

methods that perform some action other than returning a value

73
New cards

return;

the line used in a non-void method to give back a value where it was called; ends a method's execution

74
New cards

this

the keyword used as a name for the receiving object in a method

75
New cards

block

a compound statement that declares a local variable

76
New cards

formal parameters

in a method, these parameters represent the actual argument in the method definition

77
New cards

actual parameters

in a method, these parameters represent the argument, or the value that is plugged into the method

78
New cards

byte, short, int, long, float, double

the order that automatic typecasting occurs in:

79
New cards

information hiding (abstraction)

designing a method so that it can be used without much understanding; separating the why from the how

80
New cards

precondition statement

a comment that states the conditions that must be true before a method is invoked

81
New cards

postcondition statement

a comment that describes all the effects produced by a method invocation

82
New cards

private

an access modifier that makes something inaccessible outside of the method it is declared in; instance variables should always be this

83
New cards

accessor method (getter)

a method that allows you to look at data contained in an instance variable

84
New cards

mutator method (setter)

a method that allows you to change the data stored in private instance variables

85
New cards

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

86
New cards

implementation

the _____ of a class consists of all the private and public elements/methods of the class

87
New cards

+ (UML)

signifies public in a UML Diagram

88
New cards

- (UML)

signifies private in a UML Diagram

89
New cards

reference

the address of a memory location is a _____ to the object

90
New cards

reference type (class type)

a type whose variables hold references as opposed to actual values of objects

91
New cards

constructor

a special method that is called using the new operator; can initialize instance variables to your specifications

92
New cards

default constructor

a constructor with no defined parameters; must be included if another constructor is defined

93
New cards

static variable

belongs to a class as a whole and not an individual object; objects share this constant

94
New cards

final

this modifier prevents a static variable from being changed

95
New cards

local, instance, static

Java variable types:

96
New cards

static methods

methods that perform actions unrelated to an object; invoked using the class name; cannot reference an instance variable

97
New cards

wrapper class

these special classes convert each primitive type to a class type; Integer n = new Integer(42);

98
New cards

boxing

the automatic conversion/type casting from a primitive type to its corresponding class; Integer n = 42;

99
New cards

unboxing

the automatic conversion of an object of a wrapper class to a value of its associated primitive type; int i = n;

100
New cards

array

a collection of items of the same type