1/66
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Computer
A machine that stores and processes data
Hardware
Physical components of a computer
Software
Part of the computer, unseen instructions that control the hardware and processes
What is a solid-state drive?
Part of computer that uses flash memory to store files and other data. Part of storage.
What is RAM?
Part of computer that holds data read from storage
Processor
Part of computer that:
runs the computer’s programs
reads and executes instructions from memory
performs operations
Clock
governs the rate at which a process executes instructions, ticks at a specific frequency
What are the three basic instruction types?
Input, process, output
Input
program receives data (from file, keyboard, etc.)
Process
program performs computations on that data
Output
A program puts that data somewhere
Program
Created sequence of instructions
Machine language/instructions
instructions represented as 0s and 1s
Executable program
Sequence of machine instructions together
Assembly language
human readable instructions of machine instruction, low-level language that can be translated into the machine language
High-level languages
Programming using formulas or algorithms resembling written languages
ex. Java itself
Compilers
programs that automatically translate high-level language programs into executable programs
Object
real-world entity brought to life in code
What is the first step in translating high-level language?
Source code is stored on a disk in a file with a name ending in .java (source file). This has instructions written in high-level language.
What is the second step in translating high-level language?
Compiler creates bytecode that is stored on a disk in a file with a name ending in .class.
What is the third step in translating high-level language?
Java Virtual Machine (JVM) (named java.exe) performs security checks and translates bytecode to machine language, which executes
What are the stages of a code when running a program?
Java code file
Java bytecode
Machine language
Program runs on hardware
Syntax
A specific set of rules for the language
Program statements
Commands to carry out program tasks
Syntax error
Misuse of language rules, a misspelled programming language word
Debugging
Attempting to free programs of all errors
Logic error
When there is an incorrect order or procedure, compiles but not run as intended.
Class
Describes objects with common properties, a blueprint for objects
What do programs begin with?
public class NAME
For public class NAME, what does the NAME have to match?
match the name of the file
What is the second statement put into programs?
public static void main(String[] args)
What is a literal string?
Will appear in output exactly as entered, written between double quotation marks
What is an argument?
The actual value or data that you pass into a method
ex. addNumbers(5, 10); (5 and 10 are the arguments)
What is a method?
A structured, reusable block of code that groups together a sequence of statements to perform a specific task
What are method names always followed by?
Parentheses ()
What do classes always start with?
A capital letter
What can identifiers not begin with?
Cannot begin with a digit
What can identifiers not contain?
Java reserved keywords
What is public?
An access specifier meaning it is available to all other entities
What is whitespace?
Space and tabs between items within a statement and blank lines between statements
What is static?
a reserved keyword, means the method is accessible and usable even though no objects of the class exist
What is void?
Indicates the main() method does not return a value when called
What command compiles the program?
javac
What is a compile-time error?
The compiler detects a violation of languag erules and refuses to translate the class to machine code
What command interprets the class bytecode and executes the class?
java
What is a logic error?
The syntax is correct but incorrect results were produced when executed
What is a run-time error?
An error that occurs while the program is running, after is has successfully compiled (an illegal or impossible operation)
What are line comments?
Starts with two forward slashes (//), Continue to the end of the current line/ Does not require an ending symbol
What is a block comment?
Starts with (/*) and ends with (*/)
What would a javadoc comment look like?
begins with (/**) and ends with (*/)
What is an IDE?
An integrated development environment which is software that integrates a text editor (writes code) and a compiler
What is a console?
A text-based interface that allows users to run programs, enter input, and view program output
What are statements enclosed in?
curly braces
How many statements should appear on one line?
One
What do statements end with?
Semicolons (;)
What does int ___ do?
Creates a variable name that is an integer data type
What is an integer?
A whole number
Are you able to combine text and values on the same print line?
Yes
How do you combine text and values on a print line?
With a + symbol
ex. (“Wage is “ + wage);
What are blank lines?
An entire space of line between two statements
When are blank lines used?
To separate conceptually distinct statements
When should be indent lines be used?
To indent by the same amount for related lines of codes
If there is a syntax error, which lines should you look at?
At the specified line and if not there at previous lines
What should you do when fixing a long list of errors?
Fix one error first and then compile (it may fix the entire line of errors)
How much does an int hold?
+/ - 2 billion
What is double?
Like int but can use decimals
How do you read binary digits?
Binary digits are 1s and 0s. Read from right to left. The first digit to the right is to be multiplied by 1, the second 2, the third 4, the fourth by 8. It keeps doubling. Then add all of the numbers together