Programming Structure Flashcards
What is meant by a condition controlled loop?
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
Explain Inheritance as used in object-orientated programming
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
Explain how iteration can be used to perform a particular calculation one hundred times.
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
What is meant by an object?
A self contained component that incorporates data and functions
What is meant be inheritance?
The mechanism whereby the properties and methods of one class can be automatically copied to another class
Explain the advantages of using object orientated approach in improving the quality of the software produced.
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.