Lecture 9 Flashcards
What is the first generation language?
Consists of sequences of instructions encoded as numeric digits
Originally, no translator was used to compile or assemble the first-generation language.
Problems with first generation languages?
Hard to understand and tedious process
Often leads to errors
Needs debugging (locate and correct errors) all the time
What is the second generation language?
A mnemonic system for representing machine instructions
Mnemonic names for op-codes
Converted to machine language by a program called an assembler
Problems with second generation languages?
Programmer must think like the machine
Inherently machine-dependent
What are identifiers?
Descriptive names for memory locations, chosen by the programmer
What is the third generation language?
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
What is the fourth generation language?
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.
What are visual programs
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
What is low level programming?
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.
What is imperative programming?
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.
What is Object-oriented programming?
Object oriented programming is where objects combine methods and data.
What is Data encapsulation?
Data encapsulation - this means that data can only be accessed via methods provided by objects.
What is a Class?
Class - acts as a template for an object. Contains shared attributes and methods.
What is an Object?
Object - an individual instance of a class.
What is a Derived class?
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.