LANGUAGES AND ENVIRONMENTS Flashcards

1
Q

What does machine code consist of?

A

two characters 1 and 0

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

What is the language called that directly controls a computer?

A

A Low level Language

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

What is the name of the programming languages humans find easier to use?

A

High level languages

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

What must be done to a high level language before a computer can use them?

A

Must be translated into binary

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

What does syntax refer to?

A

The grammatical rules of a language

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

What are the three basic control structures used to control a computer?

A
  • Sequence
  • Selection
  • Iteration
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do all three control structures mean?

A
  • Sequence - any set of commands will be executed one after the other
  • Selection - which command to execute depends on whether a condition is true or not
  • Iteration - a set of commands is repeated for a set number of times, often called a loop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does a program being problem oriented mean?

A

When a program is created to solve a particular sort of task or written with set people in mind

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

What are the four main types of programming languages?

A
  • Procedural
  • Declarative
  • Object Oriented
  • Domain Specific
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain a Procedural language?

A
  • Commonest Type of language
  • Contains a set of commands that will be executed one after the other
  • Designed originally to teach programming
  • Use standard arithmetic operations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain Declarative Programming languages?

A
  • Created to match how humans think
  • associated with artificial intelligence programming
  • Consists of a set of facts and rules (Knowledge base)
  • Program run by entering a query, solution found by finding a match between the query and the rules and facts in the knowledge base.
  • Will not necessarily follow a set of operations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A Declarative Programming language makes use of recursion, what is this?

A

recursion is when a sub program repeatedly calls itself until a simple base fact is identified.

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

A Declarative Programming language uses self modifying code, what is this ?

A

This is where the program modifies the set of facts and rules

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

What is an Object Oriented Language

A

This is a more efficient procedural language

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

What are objects

A

Objects are re-usable blocks of code which define data used within that block and how that data can be changed.

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

What do you call the data associated with an object

A

Instance variables or attributes

17
Q

What are the procedures and functions that can change data called

A

methods or operations

18
Q

How are errors by global variable less likely in an object oriented programming language

A

Objects are closed systems which cannot be altered from outside also known as encapsulation

19
Q

what is meant by inheritance

A

this is the ability to create a sub class from a pre defined class

20
Q

How do objects interact with each other

A

they send messages from one object to another

21
Q

What are class libraries

A

these are sets of classes that can be used by developers as building blocks for complex applications

22
Q

What type of language is designed with one specific task in mind

A

Domain specific

23
Q

What is a scripting language

A

A scripting language is designed to add extra functionality to, or automate an application program or an operating system.

24
Q

What is a macro

A

A macro is a sequence of operations that can be invoked as a single task

25
What are the two types of translators
Compilers and interpreters
26
Explain an interpreter
Line By line translation, Can identify errors immediately, need every time the program is run.
27
Explain a compiler
Translates all code at once, translation is saved no need to be translated again, more efficient as no extra memory or processor resources are needed.