Unit 1 - Programming Basics Flashcards
&& (and)
The boolean && operator takes two arguments and returns false unless both inputs are true.
|| (or)
The boolean || operator outputs true if either inputs are true (or both).
= operator
The = operator (equal sign) is an assignment operator that is used to assign values to variables.
Algorithm
A logical step-by-step plan that we need to build for solving a problem.
Argument
An argument is the actual value(s) that is being passed into the method when it is being called.
Boolean Expression
A boolean expression is an expression whose value, when evaluated, is either true or false.
Boolean Operators
Boolean operators (also known as logical operators) allow us to build and combine more complex boolean expressions from more basic expressions.
Bytecode
An intermediary step for code conversion between the programming language that you write and the machine code that a computer uses.
Chained Conditional
A chained conditional is a conditional statement with a series of alternative branches.
Comments
The // (double forward slash) is used in Java code to identify a comment. Commented lines of code are ignored by the compiler during run time. A programmer adds comments throughout the code to explain how the program or function works.
Comparison Operator
A comparison operator is one of a group of operators that compares two values. These include ==, !=, >, <, >=, and <=.
Compiler
A compiler scans an entire program and attempts to convert the whole program at once to machine code.
Concatenate
Joining two strings together using the addition (+) operator.
Condition
A condition is a boolean expression in a conditional statement that determines which branch is executed.
Corner case
Value you are testing is in between two edge cases.
Data Type (or Type)
The type of data that a variable can store.
Debugging
The process of testing and fixing errors in the code.
Development Life Cycle
A high-level process for planning, creating, testing, and deploying an application.
Distributed Language
A programming language, like Java, that is designed to run on computer networks.
Edge case
Values that are at the end of a testing range.
Escape Sequences
Special characters that are specified using a backslash () followed by a letter. These help Java indicate the character that controls the display of information on the screen.
Exceptions
Errors detected during execution (running of the code) are called exceptions.
Identifier
An identifier is a name for the variable.
Initialization
The providing of an initial value of a variable when it is declared.
Input
Ways a program gets its data; user input through the keyboard, mouse, or other device.
Integrated Development Environment (IDE)
A text editor that has additional functionality to allow developers to perform some additional tasks to simplify the workflow of the development process.
Interior test
Test values that are within a specific range where the precise values that we entered within that range did not matter.
Interpreter
An interpreter takes the bytecode one line at a time and converts it to machine code.
Java Keywords
A reserved word with a predefined meaning in the programming language.
Libraries/Library
Prewritten code collections that you can use when developing a program.
Literal String
A series of characters that are combined together.
Logic Error
An error in the logical design of the program that causes it to behave incorrectly, producing incorrect results. Also known as semantic errors. Logic errors are not detectable by the Java compiler.
Machine Code
The computer uses 0s and 1s to perform tasks.
Method
Methods are a piece of code that runs when it is called. We have the ability to pass in data into those functions which are called parameters.
Method Definition
The method definition is the first line when we create a new function to be used in a program.
Modulus Operator (%)
The modulus operator returns the remainder of the two numbers after division. It is represented in Java by the (%) symbol.
Nested selection statement
A selection statement that appears in one of the branches of another conditional statement.
Object
An object is an instance of a class that has properties and methods that are encapsulated or part of it.
Object-oriented Programming Language (OOP)
A particular way of organizing programs by dividing them into separate modules, called objects, that encapsulate the program’s data and operations.
Output
The results at the end of a program based on user input and system processing.
Parameter
A parameter is the actual variable name(s) when we define a function definition.
Platform Independent
A Java program can be run on virtually any computer system platform including MacOS and Windows.
Primitive Data Types
These data types are built into the Java programming language.
Processing
Takes the data inputs and prompts and calculates the results.
Program
A sequence of computer language statements that have been crafted to do something.
Pseudocode
English-like statements that describe the steps in a program or algorithm.
Selection Statement
A selection statement is a statement that controls the flow of execution depending on some condition.
Short-Circuit Evaluation
Short-circuit evaluation is when the evaluation of a logical expression stops because the overall value is already known.
Stack Trace
A stack trace is a list of Java objects and methods that are involved in an error at runtime and are printed to the screen when an exception occurs.
String
A data type that can store a literal string as a value.
Syntax
The syntax is the “grammar” rules of the programming language. Each programming language (like Python) has its own syntax.
Syntax Error
An error that breaks one of Java’s syntax rules and is detectable by the Java compiler.
Testing
Identify errors, or bugs, in the code.
Truth Table
A truth table is a small table that lists every possible input value and gives results for the operators.
Value
One of the basic units of data, like a number or string, that a program manipulates.
Variable
A named memory location that has the ability to hold various distinct values as different points in time in the program.
Virtual Machine
A software program that behaves like a completely separate computer within an application.
boolean
A boolean data type consisting of a value of either true or false.
float
A numeric data type referring to a floating-point number. It is a number that can be positive or negative and uses decimal values.
int (integer)
A numeric data type consisting of an integer or a whole number. It can either be a positive or a negative number, but it does not have any decimals.
not Boolean Operator
The not boolean operator (in Java represented by !) works with one argument and returns the opposite truth value of the argument.
print( ) and println()
Methods that allow Java to output content to the Shell (screen). The println() method adds a new line at the end of the output.
try and catch Statements
The idea of the try and catch statements is that you know that some sequence of instruction(s) may have a problem and you want to add some statements to be executed if an error occurs. These extra statements (the catch block) are ignored if there is no error.