Programming Structure Flashcards

1
Q

What is meant by a condition controlled loop?

A

A sequence of instructions repeated while a condition is true, in which case the condition is tested at start of loop, or until a condition becomes true in which case the condition is tested at end of loop

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

Explain Inheritance as used in object-orientated programming

A

A class can inherit the properties of an existing class, the existing class is known as parent class and new class is known as child class. Inherited properties can be defined for child class, and inherited methods can be re-defined

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

Explain how iteration can be used to perform a particular calculation one hundred times.

A

A sequence of instructions is repeated a number of times. A variable is used to control a loop. The variable will be initialised and incremented each time a loop is executed. The loop will be performed until the value of a variable reaches 100

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

What is meant by an object?

A

A self contained component that incorporates data and functions

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

What is meant be inheritance?

A

The mechanism whereby the properties and methods of one class can be automatically copied to another class

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

Explain the advantages of using object orientated approach in improving the quality of the software produced.

A

More accurate modelling- object orientated approach models the real world more realistically than traditional methods.

Improved productivity due to reusability- when a object is created it will automatically inherit the data attributes and characteristics of any class from which it is derived.

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