1.4 Programming Flashcards

1
Q

Class definition

A
A class is a set of objects which share a common data structure and current behaviour. 
It is the template that can be used to create objects
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

An object definition

A

An object is an instance of a class when they’re being used

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

Instantiation definition

A

Is it the concept of an object to being based on a class

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

Encapsulation definition

A

Objects should contain within themselves everything I need including all the attributes and methods

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

Polymorphism definition

A

The same name is used in the class hierarchy for a method but each class may implement this method to differently

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

Inheritance definition

A
Enables new objects to take on the properties of existing objects
Super class is used as the basis for inheritance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Subclass

A

Is that in Heritance from a super class is called asset class. Inheritance in different relationships between classes and organises classes into groups

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

State the purpose of Backus-Naur form (BNF

A

BNF is used to describe (unambiguously) the syntax/grammar of a programming/computer language.

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

why Backus-Naur Form (BNF) is preferable to ordinary English or Welsh when defining the syntax of a computer language

A

It is unambiguous

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

Explain the difference between a procedural and non-procedural programming language

A

Procedural languages are concerned with carrying out an ordered set of instructions
Non-procedural languages are to do with facts / rules / queries

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

4GL

A

· used in (e.g.) a relational database system as a query / manipulation language
Why:
· aimed at end-users / relatively close to natural language / requires less programming skill.

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

Visual Language

A

· used for production of objects / buttons / icons / GUI / Windows / graphics content / event driven environment.

Why:
· may be easier to learn / more intuitive because visual / good help / tools available

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

State when a scripting language might be used

A

A scripting language is often embedded in other languages and can add functionality to web pages

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

Explain why careful version control is necessary when developing computer programs

A

· If programmer A modifies current version, and programmer B modifies an earlier version, neither new version will contain both modifications
· Any amendments must be made to the most recent versions.

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

Explain the role of a break point when debugging a program

A

Break point: allows the programmer temporarily to halt execution in order to ascertain the value of variables at that point

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

Explain the role of a variable watch when debugging a program

A

Variable watch: lists the value of a variable at specific points during the execution.

17
Q

Explain the role of a store dump when debugging a program

A

Store dump: lists the entire contents of memory at a specific point.

18
Q

Explain what is meant by the term parallel processing

A

Parallel processing is the simultaneous use of several processors / cores to perform a single task.

19
Q

give an example of an application where parallel processing might be useful.

A

PP could be useful in (for instance) weather forecasting or image processing

20
Q

Discuss the nature of different programming paradigms

13 marks

A

Procedural languages
· Procedural languages are used in traditional programming based on algorithms or a logical step by- step process for solving a problem
· Allows tight control over the underlying operation of the hardware
Scripting Language
· Set of commands understood by the applications software
· Usually embedded in another language and is used to control aspects of the software
Non-Procedural languages
· Non-procedural programming languages allow programmers to specify the results they want without specifying how to solve the problem
· Non-procedural languages are to do with rules / making queries
Object Orientated Language
· Uses objects and classes - include both data and associated processing
· Applies the principles of encapsulation, inheritance and polymorphism to aid programming
Special Purpose Language
· Languages that were designed with a specific purpose in mind as opposed to a more general use language
· Might have essential / helpful features relevant to the application
4th Generation Language
· First generation programming languages created construct above the machine-code program
· Each subsequent generation represented a further distancing from the binary code that the computer hardware actually reads
Natural Languages
· The user would not need to structure voice (or typed) input in any way - could communicate with the computer as if with another person
· A natural language interface would need very high processing power / very complex software
Visual Programming Languages
· High level programming language
· Particularly suitable for production of objects / buttons/ icons, etc.
Application packages that have programming
capabilities
· Additional functionality can be added without a programmer / buying another package / program
· Can customise the package / tailor to specific needs etc