HP1 First Vocab Set

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/99

flashcard set

Earn XP

Description and Tags

Tawfik's first vocab set for HP1

100 Terms

1
New cards

Rule

Required items for a program to compile/run

2
New cards

Convention

Items not required to compile, but generally accepted programming practices

3
New cards

Naming convention

Consistent, structured plan for naming things

4
New cards

Camel Case

The naming convention where the first letter of each additional word is capitalized with no spaces between words (Ex: camelCase)

5
New cards

Upper Camel Case

The naming convention where the first letter of each word is capitalized with no spaces between words (Ex: CamelCase)

6
New cards

Editor

Used to write and manipulate source code

7
New cards

Compiler

Transforms source code written in a programming language into another computer language

8
New cards

Integrated Development Environment (IDE)

Software application that provides comprehensive development tools to programmers

9
New cards

Object

Code that represents real and imaginary things in a program


*Objects can have states/attributes and dbehaviors (actions) and are defined by a class (EX: DOG object: States - moving, asleep, sick; Attributes: name, breed, color, weight, height; Behaviors - bark, eat, sleep, run, poop)

10
New cards

Class

A java file and the blueprint/template for creating objects (describes the states and behaviors)

11
New cards

Method

Behaviors (actions) of an object

12
New cards

Field

Stores the states/attributes of an object

13
New cards

Public

Used in the declaration of a class, method, or field that can be accessed by the members of any class

14
New cards

Void

Method modifier that returns nothing

15
New cards

Argument

Input by users or other methods

16
New cards

Escape Sequence

A combination of characters starting with a backslash (\) and placed within quotes with meaning beyond the literal characters, they are primarily used to put non-printable characters in string literals.

Ex:

\n – newline

\r – carriage return

\t – tab

\f – form feed

\’ – single quote

\” – double quote

\\ – backslash

17
New cards

Arithmetic Operators

Used in mathematical expression in the same way that they are used in algebra ( +, -, *, /, %, ++, --  )

18
New cards

Relational Operators

Return true or false ( >, <, >=, <=, !=, == )

19
New cards

Numerical Literal

A sequence characters made of digits and up to one decimal point that may be preceded by a plus or minus sign

20
New cards

String Literal

A sequence of characters enclosed in quotation marks

21
New cards

String Concatenation

The operation of joinng character strings end-to-end

22
New cards

Comment

Explanation or annotation in the soure code of a program ignored by the computer.

23
New cards

Modulus

Like dividing, but only returns the remainder; remainder of the division of one number by another

24
New cards

Modulo

Arithmetic operator (%) that returns the reaminder of integer divison.

13 % 6 = 1

4 % 2 = 0

5 % 10 = 5

^

If the number, the second number(divisor) is bigger than the first(dividend), and the answer would be a decimal, then the answer would just be the first original number(divisor).

25
New cards

Divison

In basic programming division for many languages, when dividing without using a decimal in programming then it returns only the whole number, not the remainder.

Ex:

13 / 2 = 6

^

Only returns the whole number, not the remainder

26
New cards

Variable

Memory location paired with a symbolic name that can hold a value used in a program


The “final” keyword is the only difference between making a varible and a constant; If you use the word “final”, it is a constant.

27
New cards

Constant

Variable that cannot be altered once initialized


The “final” keyword is the only difference between making a varible and a constant; If you use the word “final”, it is a constant.

28
New cards

Identifier

User-defined named of a program element (varibale name, method name, etc.)

29
New cards

Declaration

Identifying the name of an item you plan to use later in the program

30
New cards

Initialization

Assigning the original value to a variable, constant, or array

31
New cards

Final

Modifier to define an entity that cannot be changed nor defived from once initialized


The “final” keyword is the only difference between making a varible and a constant; If you use the word “final”, it is a constant.

32
New cards

Assignment Operator

Assigns the value on its right to a varibale or element on its left (=)

33
New cards

Primitive Data Type

Type with predetermined memory size to hold the value of variables

34
New cards

Byte

Integers from -128 to 127 (Size 8 bit)

35
New cards

Short

Integers from -32,768 to 32,767 (Size 16 bit)

36
New cards

Int

Integers from -2,147,483,648 to 2,147,483,647 (Size 32 bit)

37
New cards

Long

Integers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (Size 64 bit)

38
New cards

Float

Real numbers from 3 .4e–038 to 3.4e+038 (Size 32 bit) roughly 6-7 decimal digits

39
New cards

Double

Real numbers from 1 .7e–308 to 1.7e+308 (Size 64 bit) roughly 15-16 decimal digits

40
New cards

Boolean

True/false, (Size 1 bit)

41
New cards

Char(Character)

Single Unicode character (Size 16 bit)

42
New cards

Variables Rules/ Naming Conventions

Start with a letter, but can have numbers after (Rule)

Has no spaces or symbols (Rule)

Starts with a lowercase letter (Convention)

camelCase if multiple words (Convention)

43
New cards

Constants Rules/Naming Conventions

Start with a letter, but can have numbers after (Rule)

Has no spaces or symbols (Rule)

Letters are ALL CAPS with underscores (_) between words (Convention)

44
New cards

Reference Data Type

Does not hold hte value of a variable, but just a reference to a different memory location with the value.

45
New cards

String

Reference Data Type… a String variable does no thold hte actual “string” of letters. It holds a reference (remote) to a different location in memory that holds the letters.

46
New cards

Documentation

Written text that accompanies software that explains how it works or how ot use it

Ex: Instruction manuals, Coding Comments,

47
New cards

Pseudocode

Informal description of the operating principle of a computer program inteded for human reading rather than machine reading

48
New cards

Package

Groups for organization within Java progamming

49
New cards

Import

Used at the beginning of a source file to specify classes or entire Java packages to be referred to later.

50
New cards

Double

Can hold a very big number or a very precise decimal number; for holding decimal integers

51
New cards

Float term

For holding decimal integers, ½ as small as a double

52
New cards

If

Used to create a statement which tests a boolean expression

53
New cards

Else

Used in conjunction(alongside) with if to create statement which tests a boolean expression

54
New cards

equals()

Compares the target values that are referenced in the variable’s memory

55
New cards

Readability

It is much easier to understand code that has a clearly named constant than just a number like “1.027”

56
New cards

Memorable

Numbers with several digits may be difficult to remember when writing code and you can waste time by needing to look it up frequently. Memorable code utilizes constants or variables with meaningful names, making it easier for programmers to recall and understand.

57
New cards

Upgradeable

It is much easier to change/update a program that uses constants if in fact the constant needs to be changed at a later time (ex. scientists discover the gravity for Venus is actually .82 instead of .78 and you used a .78 in over 80 different places in your code).

58
New cards

Safety

It is possible to forget that a variable needs to stay the same later while coding. If using a variable and not a constant for a value that should not change, you may mistake it later and change it. Even more likely, if working with otehr programmers, it will not be clear that the value should not change. A constant prevents you from accidentally changing a needed value while also protecting it from other programmers.

59
New cards

Algorithm

A procedure or formula (to solve a problem)

60
New cards

truth table

mathematical table used in logic in connection with boolean functions which sets out the functional values of logical expressions on each of their functional arguments


Truth Tables (in code):

// AND

System.out.println(true && true);   // true

System.out.println(true && false);  // false

System.out.println(false && true);  // false

System.out.println(false && false); // false



// OR

System.out.println(true || true);   // true

System.out.println(true || false);  // true

System.out.println(false || true);  // true

System.out.println(false || false); // false



// Not (!)

System.out.println(!true);             // false

System.out.println(!false);            // true

System.out.println(!(true && true));   // false

System.out.println(!(true || false));  // false

System.out.println(!(false || false)); // true

System.out.println(!(!false || false) && (!true || true));

System.out.println(false && true); // false

61
New cards

logical operators

checks two boolean values to determine if an expression is true or false (&&, ||)

62
New cards

Compound If Statements

&& and || - Only work with boolean data type and they “short ciruit”

63
New cards

Flowchart

diagram of the sequence of operations in a computer program

pill (rounded rectangle) - start/end of program

rectangle - task or action

diamond - decision (yes or no / true or false)

parallelogram - input or output

64
New cards

syntax error

one or more characters incorrectly placed in a command that causes a failure in execution

65
New cards

compile-time error

error that occurs when code is compiled and is typically a result of a syntax error

66
New cards

runtime error

problem that occurs while program is running and not caught by compiler

67
New cards

logic error

mistake in source code that results in unexpected behavior

68
New cards

compareTo()

compares to strings lexicographically iwth the value based on the Unicode value of each character in the string.

69
New cards

lexicographical

dictionary or “alphabetical” order

70
New cards

length()

returns an int representing the total number of characters in the String (including punctuation adn whitespace).

ex: if the variable str contains the String “hello”, then str.length() will return 5 and a String with “ hello “ would return 7.

71
New cards

charAt(int in)

returns the nth character (char) in the String. The character positions are zero=based. so if the variable str contains the String “bulldog”,then str.charAt(0) will return ‘b’, and str.charAt(4) will return ‘d’.

72
New cards

keyword

one of 50 reserved terms that have a special function and a set definition in the java programming language. The fact that the terms are reserved means that they cannot be used as identifiers for any other program elements, including classes, subclasses, variables, and methods.

73
New cards

scope

the region of a computer program where the name binding of a variable is valid

74
New cards

base 16 numeral system

represents numeric values using 16 different symbols = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F

75
New cards

base 8 numeral system

represents numberic values using 8 different symbols 0,1 2, 3, 4, 5, 6, and 7

76
New cards

octal

(base 8) a positional numeral system with a base of 8

77
New cards

base 1 numeral system

represents numeric values using one symbol (just like making tally marks)

78
New cards

nibble

unit of information consisting of four bits (half byte)

79
New cards

byte (Java)

integers from -128 to 127 (size 8 bit)

80
New cards

byte

unit of information consisting of 8 bits

81
New cards

short

unit of info size 16 bit

82
New cards

int

unit of info size 32 bit

83
New cards

long

unit of info size 64 bit

84
New cards

float

unit of info size 32 bit

85
New cards

double

unit of info size 64 bit

86
New cards

boolean

unit of info size 1 bit

87
New cards

char

unit of info size 16 bit

88
New cards

Reference Data Type

Size 64 bit

89
New cards

iterational

statements are executed repeatedly

90
New cards

selectional

based on conditions, different statements are executeds

91
New cards

sequential

executed in the order written

92
New cards

control structures

way to specify the order of executing the statements

93
New cards

structured programming

all programs are composed of 3 control structures

94
New cards

exeption

event that disrupts the normal flow of a program’s instructions

95
New cards

thread

independent path of execution within a program

96
New cards

for

used to create a loop which specifies a variable initialization, a boolean expression, and an incrementation

97
New cards

break

used to terminate program executino in the current loop body

98
New cards

continue

resume program execution at the end of the current loop body

99
New cards

return

used to finish teh execution of a method and can be followed by a value required by the method definition

100
New cards

parameter

variable declared in method definition required for method call