Exam Questions Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Describe, giving an example of each, two types of translation error

A

Syntax error - IF written in code without endif

Semantic error - variable declared illegally

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

Describe Agile and Waterfall approaches to analysis and design

A

Waterfall:
Sequential process

Developers draft the design of the system up front and it doesn’t change

Once the analysis and design stage is completed, developers cannot go back and make changes

Requires less communication between the client and developer
Agile:
Incremental approach to development

Start with simple project design requirements

Changes can be made after each phase of development, the analysis can be revisited, designs can be changed

There is strong, regular communication between the client and the developer

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

What is a compiler

A

Convert high level language (source code) into machine code (object code)

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

What is an interpreter

A

Runs a high level language program without converting it into a binary executable

Takes a line of the high level program (source code), translates it and runs it, then runs the next line etc.

Translates source code instructions line by line

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

Advantages of a compiler

A

Although compilation may take mins, it produces an executable that will be fast to run over and over again

Executable program can be given to the end user without them needing to have a compiler

Very difficult for the end user to edit the code as it is in binary format

Shows a list of errors in the program which must be corrected before compilation (can also be disadvantage)

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

Disadvantages of compiler

A

Compiling can be slow and tedious when developing a program (as each time program needs to be ran it has to be recompiled)

A compiler targets a particular platform and cpu instruction set e.g. programs compiled for android ARM processors won’t work on Intel x86 chips etc.

Commonly used for a number of languages e.g. python, javascript

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

Advantages of an interpreter

A

No delay in waiting for compilation, program can begin to run immediately (ideal for program development)

Should run on any computer as long as there is an interpreter available for the language

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

Disadvantages of an interpreter

A

Program will tun much more slowly as each line of code needs to be translated each time before it can run

Needs an interpreter to run it

End user has access to source code (can be stolen)

Only finds errors when it gets to a line with an error in, so program could have errors thst are never discovered until experienced by the end user

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

How does a compiler deal with translation errors

A

A compiler spots the errors and shows a list of errors in the program which must be corrected before compilation

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

How does an interpreter deal with translation errors

A

An interpreter will only find the error when it gets to the line with the error in, meaning it will be experienced by the end user

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