December
1998 QUESTION 4 Total Marks: 20 Marks |
Click here to access other
questions
SUGGESTED SOLUTIONS
|
Each part of this question requires
consideration of the various characteristics of programming languages, and of the four
generations of programming languages.
|
||
(a) | Programming languages possess engineering characteristics, which essentially determine the degree to which the programming language will affect the technical development of the program. List and explain three examples of such engineering characteristics. | [6] |
Any three of the
following: 1 mark for correctly identifying the characteristic, 1 mark for a suitable
explanation. Ease of design to code translation: indicates how closely a programming language can represent a design representation. Compiler efficiency: Many applications today still require fast, "tight" (i.e. low memory requirements) programs. Languages with optimising compilers may be attractive if software performance is a critical requirement. Source code portability: This generally refers to whether source code may be transported from processor to processor and compiler to compiler with little or no modification. Availability of development tools: These can shorten the time required to generate source code and can improve quality of code. Maintainability of source code: Source code must be easy enough to understand so as to allow modifications according to changes in design.
|
||
(b) | (i) Assembly language and machine language are considered to be low-level languages. Describe what is meant by the term low-level language. | [1] |
Low-level languages
communicate with the computer hardware (or processor) directly (1 mark).
|
||
(ii) Describe one other similarity between assembly language and machine languages. | [1] | |
Similarity: both are
machine-dependent (or non-portable) languages (1 mark); or both are generally difficult to
use or tedious to code in (1 mark).
|
||
(iii) One difference between assembly language and machine languages is that assembly language is generally easier to use than machine language, and this is because of the use of mnemonics. Explain briefly the meaning of the word mnemonic. | [1] | |
Mnemonics are English
words (or constructs) used to represent machine opcodes.
|
||
(iv) Identify one application area in which such low-level languages should be used. | [1] | |
Application
areas: e.g. operating systems (1 mark), device drivers (1 mark). Any type of application or program that communicates directly with hardware should be accepted.
|
||
(c) | (i) Second generation and third generation languages are frequently called high-level languages. Give one example of a second generation and one example of third generation language. | [2] |
Example of 2nd
GL. 1 mark for one of : FORTRAN, BASIC, COBOL. 3rd GL. 1 mark for one of: C,
PASCAL.
|
||
(ii) Describe in some detail one advantage offered by high-level languages. | [2] | |
High level
languages are generally versatile enough for application to a wide range of programs; they
are generally also popular, resulting in good establishment (i.e. library routines,
documentation) of the language. Other valid alternative answers should be accepted. ! mark for a correct but short answer lacking depth, 2 marks for an illustrative and detailed answer indicating good understanding. No marks should be awarded if candidates simply state easy to use without clarification.
|
||
(d) | (i) Write down one example of a 4th generation language and identify one application area in which the use of 4th generation languages would be ideal. | [2] |
Example of 4th
GL. 1 mark for one of: Foxpro, Dbase, ACCESS, Paradox etc. Application area. 1 mark for one of: creation of prototype, information-intensive systems, databases. Other correct alternative answers should also be given credit.
|
||
(ii) Explain why 4th generation languages are considered to be easy to use. | [2] | |
Ease of use: in 4th
GL, only the details of what needs to be done must be specified, as opposed to how it is
being done; 4th GL allows for the development or creation of programs in ways
that model human means of communication. 1 mark for a correct but short answer lacking depth, 1 mark for a illustrative and detailed answer indicating good understanding.
|
||
(iii) Describe briefly one disadvantage of 4th generation languages. | [2] | |
Disadvantage of 4th generation language: limited application domain. |