Week 1 Flashcards
(27 cards)
Program
A program is a sequence of instructions that specifies how to perform a computation on computer hardware.
Programming
The process of breaking down a large, complex task into smaller and smaller subtasks.
Method
A method is a named sequence of statements.
What is the relation between class name and file name?
The name of the class has to match the name of the file it is in
What are comments?
The line that begins with two slashes (//) is a comment, which is a bit of English text that explains the code.
What are the advantages of high-level languages?
- It is much easier to program in a high-level language.
- High-level languages are portable, meaning they can run on different kinds of computers with few or no modifications.
Which two kinds of programs translate high-level languages into low-level languages?
Interpreters and compilers.
What is an Interpreter?
An interpreter reads a high-level program and executes it, meaning that it does what the program says. It processes the program a little at a time, alternately reading lines and performing computations.
What is a compiler?
A compiler reads the entire program and translates it completely before the program starts running.
What is source code?
The high-level program is called the source code.
What is the translated program called?
The translated program is called the object code, or the executable.
What is an algorithm?
An algorithm is a sequence of steps that specifies how to solve a problem. Some algorithms are faster than others, and some use less space in computer memory.
What is Computer Science?
Computer science is the science of algorithms, including their discovery and analysis.
What are bugs? And what is debugging?
For historical reasons, programming errors are called bugs, and the process of tracking them down and correcting them is called debugging
What is a Variable?
A variable is a named location in memory that stores a value.
What is a Value?
Values may be numbers, text, images, sounds, and other types of data.
What are compile-time errors?
Compile-time errors occur when you violate the rules of the Java language.
What is Parsing?
Parsing is the process of reading a program before translating
What is a Logic Error?
A logic error is a bug in a program that causes it to operate incorrectly, but not to terminate abnormally (or crash).
What is a Run-Time Error?
An error that dWoes not appear until after the program has started running.
What is the meaning of the class system?
System is a class that provides methods related to the “system”, or environment, where programs run.
What is the Java Library?
An extensive collection of classes that you can use in your programs.
What does the import statement in “import java.util.Scanner;” mean?
This import statement tells the compiler that when you refer to Scanner, you mean the one defined in java.util. Using an import statement is necessary because there might be another class named Scanner in another package.
What are the language elements from smallest to greatest?
Token, Expression, Statement, Method, Class, Package