CSCI 1301 Exam 1-UGA

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

1/77

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.

78 Terms

1
New cards

Hardware

The physical components of a computer.

2
New cards

Software

written programs or procedures or rules and associated documentation pertaining to the operation of a computer system and that are stored in read/write memory

3
New cards

main memory

holds current memory, volatile (goes away)

4
New cards

auxiliary memory

exists once the computer turns off (hard drive)

5
New cards

input

keyboard, mouse, etc.

6
New cards

output

monitor, printer, etc.

7
New cards

RAM

Random Access Memory - is the main memory, and the hard drive is the principal

8
New cards

CPU

(Central Processing Unit) The key component of a computer system, which contains the circuitry necessary to interpret and execute program instructions

9
New cards

1 bit

smallest unit

10
New cards

4 bits

nibble

11
New cards

8 bits

1 byte

12
New cards

1,000 bytes

1 KB

13
New cards

1 million bytes (1,000 kilobytes)

1 MB

14
New cards

1 billion bytes (1,000 megabytes)

1 GB

15
New cards

bytes in larger units are ____

files

16
New cards

Files are organized into ____

folders or directories

17
New cards

machine language

(what the computer understands)- is a "low-level language" which is binary (01001101)

18
New cards

"high-level language"

A programming language like Java that is designed to be easy for humans to read and write.

19
New cards

JVM

Java Virtual Machine, an interpreter for compiled Java bytecodes - translates and runs the Java bytecode

20
New cards

OOP

Object-Oriented Programming- views a program as similarly consisting of objects that can act alone or interact with one another

21
New cards

Encapsulation

packages and hides details

22
New cards

Polymorphism

allows the same program instruction to mean different things in different contexts - one method name causes many different actions

23
New cards

Inheritance

is the way of organizing classes

24
New cards

code HelloWorld

public class HelloWorld{

public static void main(String[] args){

System.out.print("Hello World");

}

}

25
New cards

Variable(s)

store data and/or values

26
New cards

data types

say what the variable is storing

27
New cards

int

whole numbers

28
New cards

double or float

decimals

29
New cards

char

characters (letters)

30
New cards

boolean

true or false

31
New cards

string

words/phrase

32
New cards

primitive types

int, char, double/float

33
New cards

constants

variables that next change in your code - written as:

final int thisNumber = 4;

or

int THIS_NUMBER = 4;

34
New cards

True or false:

Java is case sensitive

true

35
New cards

"keywords" that should NEVER be included in your code

if, public, class, while, for, print, etc.

36
New cards

order of data types by size:

byte-short-int-long-float-double

37
New cards

e notation: 4x10^8

4e^8

38
New cards

"="

the assignment operator, gives a variable a value

39
New cards

"+"

"-"

"*"

"/"

"()"

"%"

math operators

40
New cards

++

increment by 1

41
New cards

--

decrement by 1

42
New cards

Type casting

Converting data from one type to another, e.g., from string to int

43
New cards

//

comments out rest of the line

44
New cards

/ /

comments out multiple lines

45
New cards

if statement operators:

<

>

<=

>=

==

!=

||

&&

respectively:

less than

greater than

less than or equal to

greater than or equal to

equals

does not equal

or

and

46
New cards

lexicographic order

similar to alphabetical order and is sometimes, but not always, the same as alphabetical order - the letters and characters are ordered according to their Unicode sequence

47
New cards

.length ();

returns int of how long the string is

48
New cards

.indexOf();

returns the index of a letter (position, because String starts with index 0)

49
New cards

.equals();

.equalsIgnoreCase();

equality of 2 strings (just like == is for int)

50
New cards

.toUpperCase();

.toLowerCase();

all characters to upper case or lower case

51
New cards

.compareTo();

compares to help with ordering alphabetic characters

-If compare x1 to x2 and returns >0(+) then x1 comes after x2

-If compare x1 to x2 and returns <0(-) then x1 comes before x2

-if compare x1 to x2 and returns 0 then x1 ad x2 are equal

52
New cards

\t

tab

53
New cards

\n

forces to next line

54
New cards

switch statement

allows multi-way branching. In many cases, using a switch statement can simplify a complex combination of if-else statements.

55
New cards

enumerations

limit the amount of values a variable can have

56
New cards

while loop

repeats while the boolean expression is true

57
New cards

do-while loop

same as the while loop expect the body of the loop is executed at least one time

58
New cards

for loop

used typically when you want the body to run a specific number of times

59
New cards

an array

a collection of variables of the same type

double [ ] temp = new double [7];

60
New cards

True or False:

Java arrays start at 0

True

61
New cards

arrays are indexed with ____

int

62
New cards

illegal identifiers

-identifiers cannot have a dot, hyphen, or an asterisk

-identifiers cannot start with a digit

63
New cards

only create ____ scanner object (import java.util.scanner;)

one

64
New cards

True or false:

When naming a constant, you should use upper-case characters in the name with an underscore between the words and the data type at the end of the name.

true

65
New cards

doing int 9 divided by int 10 will give you ___ (an integer answer)

0

66
New cards

the mod (%) operator

gives the remainder of int after after division

67
New cards

strings can be concatenated using the ___ operator

+

68
New cards

"\\\\" = ?

"\\" - 2 characters

69
New cards

tautology

when the expression is always true

70
New cards

contradiction

when the expression is always false

71
New cards

contingency

when the expression has at least one true or false

72
New cards

== is appropriate when...

determining if 2 ints, booleans, or chars have the same value

73
New cards

in lexicographic order numbers come before _____ , and capital letters come before _____

letters ; lowercase

74
New cards

ternary (conditional operator)

useful with print and println statemtents, but not used often

75
New cards

the exit method

System.exit(0);

76
New cards

logic error

errors that are not detected during compilation or while running, but which causes the program to produce incorrect results

77
New cards

runtime error

errors are detected when the program is running, but not during compilation

78
New cards

syntax error

grammatical mistakes in a program