1.2.4: Types of Programming Language Flashcards
1
Q
What is Machine Code?
A
- Closest to what actually happens in a computer
- Programs directly in 1’s and 0’s
- Least abstract
- Translate directly into matching electrical signals: 1 for high voltage, 0 for low voltage
2
Q
What is Assembly Language?
A
- Next level up from Machine Code
- Uses mnemonics so easier to use than Machine Code
- Each mnemonic matches a specific sequence of binary
- One-to-one relationship
- Written in Assembly Language and translated by a specific assembler
3
Q
What are High-Level Languages?
A
- First languages that could go further than Machine Code and Assembly Language (First developed in the early 50’s, starting with Fortran)
- One-to-many relationship, as each instruction could give rise to many lines of Machine Code
4
Q
What are Programming Paradigms?
A
- Different approaches to using programming language to solve a problem
5
Q
How do you decide what Paradigm to use?
A
- Depends on the type of problem that needs solving
6
Q
What is Imperative Programming?
A
- The use of code that clearly specifies the actions performed
7
Q
What is Procedural Programming?
A
- One of the most widely-used paradigms
- Uses a sequence of instructions which may be contained within procedures
- Instructions are carried out in a step-by-step manner
8
Q
What is Procedural Programming used for?
A
- A wide range of software development as it is easy to implement
9
Q
What is a drawback of Procedural Programming?
A
- It is not possible to solve all kinds of problems with Procedural Languages, or it may be inefficient to do so
10
Q
What are the advantages of Procedural Programming?
A
- Can be applied to a wide range of problems (that can easily be expressed as a series of instructions)
- Is relatively easy to write and interpret
11
Q
What do Procedural Languages use?
A
- Traditional data types such as integer and strings which are built into the language and also provide data structures like dictionaries and arrays
12
Q
What is Object-Oriented Programming?
A
- Applicable to certain types of problem with lots of reusable components with similar characteristics
- Built on entities (Objects) formed from Classes with certain Attributes and Methods
13
Q
What is the main focus of Object-Oriented Programming?
A
- Making programs that are reusable and easy to update and maintain
14
Q
What is the focus of Declarative Programming?
A
- Stating the desired result rather than the exact series of instructions that need to be performed to get the result
- It is the role of the programming language to determine how to best obtain the result
- The details about how the result is obtained are abstracted from the user
- Common programming in expert systems and AI
15
Q
What is Functional Programming?
A
- The concept of reusing a set of functions that form the core of the program
- Programs are made up of lines of code consisting of function calls, often combined within each other
- Closely linked to Maths
16
Q
What are Logic Languages?
A
- The use of code which defined a set of facts and rules based on the problem
- Queries are used to find answers to problems