4.3 introduction to Programming Flashcards
Fundamental Operations of a Computer
–> Add Data
–> Retrieve Data
–> Store Data
–> Compare Data
–> Complex operations are composed of multiple simple operations.
Syntax
Structure of programming language
Semantics
Refers to the meaning of every construction that is possible in the language
Grammar
Meta-language that is used used to define the syntax of a language
Reserved keywords
Special words in a language which have a defined function
The need for higher-level languages
–>Each computer has its own machine language which consists of 0s and 1s.
–>Machine language is hard to understand and debug
–> Assembly languages replace binary code with symbols called “MNEMONICS”
The need for a translation process from a higher-level language to a machine-executable language
–> Most applications are written in high-level languages
–> Translation is required in order to execute
–> The high-level code is called the source code/program
–> The translated code is called the object program
Compiler
–>Executes the translation only once
–> All errors are are communicated to the programmer after the code is checked
Interpreter
Goes through the translation process every time the program is run.
refers to the process of reading each line
Java Virtual Machine
This combines Compiler and Interpreter
It is compiled into bytecode
If the Java Machine Interpreter is installed the code can be run on any machine
Variable
used to store data, stored value can be changed during the code execution
Constant
Things and quantities that do not change during the program execution
Operator
Used to manipulate operands
(eg. 2+3, the number 2 and 3 are operands and the + is an operator)
Object
Comprised of data and actions/ methods (operations which can be performed by the object)
Characteristics and Applications of a Collection
–> Need to group and store data that will be used
–> Consists 0 or more elements such as objects, values,
–> Collections allow duplicate elements and may contain ordered or unordered elements