Lecture 9 Flashcards

1
Q

What is the first generation language?

A

Consists of sequences of instructions encoded as numeric digits
Originally, no translator was used to compile or assemble the first-generation language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Problems with first generation languages?

A

Hard to understand and tedious process
Often leads to errors
Needs debugging (locate and correct errors) all the time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the second generation language?

A

A mnemonic system for representing machine instructions
Mnemonic names for op-codes
Converted to machine language by a program called an assembler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Problems with second generation languages?

A

Programmer must think like the machine

Inherently machine-dependent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are identifiers?

A

Descriptive names for memory locations, chosen by the programmer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the third generation language?

A

Uses high-level primitives
Similar to our pseudocode
Machine-independent (mostly)
Examples: FORTRAN, COBOL
Each primitive corresponds to a sequence of machine language instructions
Converted to machine language by a program called a compiler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the fourth generation language?

A

Fourth generation programming languages (4GL) allow the program to be developed by creating the desired output or input visually.
Code is generated automatically instead of by hand as in 3GL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are visual programs

A

Developed to implement programs using a WIMP (Windows, Icon, Mouse and Pointer) environment.
Have special features to manipulate the WIMP environment allowing control of buttons, edit boxes, scroll boxes, radio buttons etc.
Normally object-orientated and event driven, i.e. executed when an event happens e.g. a mouse button is pressed
e.g. DELPHI, Visual C++ and Visual BASIC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is low level programming?

A

Programming in either machine code or assembly language. Low-level languages are often described as being “close to the hardware”. Low level languages often produce more efficient programs than a languages, although they are harder to learn.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is imperative programming?

A

Imperative programming is a paradigm that explicitly tells the computer what to do and how to do it.
Imperative programming is the most adaptable when it comes to implementing other paradigms. It’s a starting point to creating tools and domain-specific languages. It’s a fallback when no other approach seems to apply.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Object-oriented programming?

A

Object oriented programming is where objects combine methods and data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Data encapsulation?

A

Data encapsulation - this means that data can only be accessed via methods provided by objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a Class?

A

Class - acts as a template for an object. Contains shared attributes and methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an Object?

A

Object - an individual instance of a class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a Derived class?

A

Derived class - a class with all the features (including attributes and methods) of a superclass and additional features specific to the derived class. This is an example of inheritance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is declarative programming?

A

Declarative programs consist of declarations - statements that specify what properties the results should have. The order of declarations is not important.
The computer is told what the problem is, not how to solve it. Is when you write your code in such a way that it describes what you want to do, and not how you want to do it. It is left up to the compiler to figure out the how. It searches for a solution from a database. Very useful for solving problems in the real world, like medical diagnostics.

17
Q

What is backtracking?

A

Backtracking is going back to a previously found successful match in order to continue a search.

18
Q

What is procedural Programing?

A

A type of imperative programming
Procedural programming languages separate data and code. Code is usually modularised and a combinations of sequence, selection and iterative constructs. The programmer describes how to solve the problem, by specifying the steps to execute a program and the order they should be carried out.

19
Q

What are the 4 different data types?

A

Integer: Whole numbers
Real (float): Numbers with fractions
Character: Symbols
Boolean: True/false

20
Q

What are Static data structures?

A

Static data structures are those which do not change in size while the program is running.E.g. Arrays

21
Q

What are dynamic data structures?

A

Dynamic data structures can increase and decrease in size while the program is running.