cmsc 131 excemption exam

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

1/38

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.

39 Terms

1
New cards

operating systems

mange the computers resources; they are typically run as a computer is turned on. some examples include security-related software, and process management tools

2
New cards

applications

programs that users interact directly with. these are typically explicitly run by the users this can include word processors, games, music software, or java programs

3
New cards

compilers

programs that translate high-level programming languages into assembler or machine code, allowing the computer to execute the code. one way of executing programs

4
New cards

interpreters

programs that take course code as input and execute high-level programming code directly. it is another way of executing a program but is much slower than a compiler

5
New cards

debuggers

based on interpreters since they support step-by-step execution of source code

6
New cards

variable

a piece of memory that can store a specified type of value

7
New cards

data types

different types of variables

8
New cards

String

a data type, stores text and surrounded by double quotes. non-primitive type

9
New cards

int

stores integers (whole numbers). it takes 32-bits of memory and is a primitive type

10
New cards

float

stores floating point numbers with decimals. it takes 64-bits of memory and is a primitive type

11
New cards

char

styoes single characters and surrounded by single quotes. it takes 8-bits of memory and is a primitive type

12
New cards

boolean

stores values with two states, either true or false. it is a primitive type

13
New cards

declaration

process of defining a variable and its type in a program

14
New cards

initializing

the process of assigning a value to a variable at the time of declaration

15
New cards

reserved

keywords in programming that have special meanings and cannot be used as identifiers for variables or functions

16
New cards

modulus

an operator used to find the remainder of a division operation, denoted by the percent symbol (%) in java

17
New cards

concatenate

to join two or more strings together into a single string

18
New cards

comments

text used in code to provide explanations or annotations for better readability, ignored by the compiler

19
New cards

in-line comments

one line comments, start with the // and terminate as soon as the next line starts

20
New cards

multi-line comments

can last for multiple lines, start with /* and end with */

21
New cards

compile-time errors

errors that are caught by the compiler. includes syntax errors that violate the rules of a language and type errors which come from the mususe of variables

22
New cards

run-time errors

errors that appear during the programs execution. these include semantic errors that obey the rules of the language but do not express the meaning you intended. these can also include division-by-zero errors or wrong outputs

23
New cards

immutable

something you cannot change the contents of

24
New cards

immutability of strings

strings are immutable. when you concatenate two strings you are not adding text to the end of the string. rather, a new string is created which combines the old string and new string (bad time complexity)

25
New cards

string comparison + methods

cannot be using ==, <=, <, >=, > or ≠

can use .equals to see if the contents are equal

can use .compareTo() to compare lexicographically

can use .length() to return the number of characters of the string

=== checks if the reference points of the two strings are the same

26
New cards

Scanners

built-in classes provided in the util package that allow us to easily obtain the input of various data types

scanners deal with whitespace on default and cannot deal with input errors (ex. user enters string instead of int) - use try/catch

27
New cards

Importing, declaring, and closing a Scanner

import java.util.Scanner goes at the top of our program

declared with the line Scanner input = new Scanner (System.in);

scan.close() closes the scanner so user cannot provide any more input

28
New cards

Scanner operations

operations include .nextInt(), .nextLine(), .nextDouble() and more

29
New cards

conditional statements

only executes with a certain condition is true

if-statements and switch cases

30
New cards

if-statements

conditional statement

<p>conditional statement</p>
31
New cards

switch statement

conditional statement

<p>conditional statement</p>
32
New cards

logical operators

used to form more complex condition

33
New cards

&&

and

34
New cards

||

or

35
New cards

!

not

36
New cards

==

equals, for booleans, ints, chars, etc.

if used for strings it checks for reference equality

37
New cards

>, >=

greater than, greater than or equal to

38
New cards

<, <=

less than, less than or equal to

39
New cards