4.3 Programming Languages Flashcards
What are the fundamental operations of a computer?
ADD
COMPARE
LOAD
SAVE
What are compound operations?
Compound operations usually require a number of stages and sub operations. Whilst fundamental ones are usually just one stage.
What are the two types of languages?
Natural and Computing
What is a natural language?
Has varying vocabulary
Ambiguous
Grammar and Syntax is inconsistent
What is a computing language?
Fixed vocabulary
Unambiguous
Grammar and Syntax is consistent
What are High Level Languages?
Similar to human languages, so that humans can understand.
What are Low Level Languages?
Close to binary so that computer can process instructions.
Why are high level languages important?
Speed for humans to program
Ease of understanding
Why is translation needed?
A computer to understand high level code.
What is a compiler?
Higher level language to lower level language in one go.
What is an Interpreter
Translates into intermediate code which can then be translated by CPU
Works line by line
What is an assembler?
Translates assembly language into machine code.
What is a virtual machine?
Installed onto a computer so java can run on many types of hardware.
Why are virtual machines crucial?
Because then the programmer can write one code that will work on all platforms.
How does a virtual machine work?
Matches the hardware of your device and then allows you to run program.
What are variables?
Storage locations for data with location, and name and data type that cannot be changed.
What is a constant?
An identifier with a value that can’t be altered.
What is an Operator?
A character/set of characters that represents an action e.g. AND, =, /
What is an Object?
An instance of a class.
What process to Objects utilise?
Abstraction.
What are collections?
A linked list with an unknown size and length. With order not guaranteed.
What are Lists?
Lists are useful for when you don’t know how many items need to be stored. Can be used for any data type.
What is modular design?
Breaking parts into manageable tasks.
Distribute development in a team.
Code is reused
Easy to read.
Why is modular programming good?
Usefulness or reusable code.
Ease of program organisation
Makes future maintenance easier.
What is good about manageable tasks?
Individual tasks are easier to design, test and implement.
What are the manageable tasks called?
These tasks are called modules which can then be combined to build the program.
What is good about distributed development?
Shortens development time.
What is good about code reusability?
Reduces redundant code.
Can be used in future projects
Not writing the same thing over and over again.
What is good about readability?
Easy for users/other programmers the understand.