Low-level, high-level, procedural, declarative and object-oriented languages have allowed programmers to develop the digital world that we interact with every day.
Why are low-level languages used?
They are written in language that is English like in its structure
They allow for the optimisation of code because of a one to one conversion to machine code
They are highly portable and therefore save time when programming
Which of these is not a feature of high-level languages?
Language is architecture/platform dependent
Language can make use of data structures such as arrays and records
Selection statements can be used within procedures and subroutines
What name is given to the data that can move from procedure to procedure within a procedural language?
A declarative language contains a fact that can be expressed as:
There is a local train service between Glasgow and Neilston. Which answer shows the correct expression of this fact in a declarative language?
glasgow (local_service, neilston)
local_service (glasgow, neilston)
? local_service (X, neilston)
Pattern matching is a feature of declarative languages. What is the role of pattern matching?
To hold facts and rules that can be queried by algorithms
To use an algorithm to query the knowledge base
To represent variables within a query
The description shown below describes one of the possible answers. Select the answer described:
The value of an attribute/instance variable at any given time within the context of object-oriented programming.
Within object-oriented languages, what is creating code to change the state of an attribute known as?
Creating an operation
Creating a rule
Creating a procedure
Why can inheritance lead to easier maintenance when using object-oriented languages?
Attributes and operations are held as one single item rather than as separate entities
Corrections to shared characteristics are made once in a super class/sub class and then reflected automatically in sub classes/instances
Attributes of subclasses that are unique are predicted by the software to reduce implementation time
Which feature of a high-level languages is needed for the creation of executable code?
Which form of programming language is briefly described below?
This form of language follows clearly defined algorithms that allow for logical structure and order. Code and data are held separately.