1.4 Programming Flashcards
Class definition
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
An object definition
An object is an instance of a class when they’re being used
Instantiation definition
Is it the concept of an object to being based on a class
Encapsulation definition
Objects should contain within themselves everything I need including all the attributes and methods
Polymorphism definition
The same name is used in the class hierarchy for a method but each class may implement this method to differently
Inheritance definition
Enables new objects to take on the properties of existing objects Super class is used as the basis for inheritance
Subclass
Is that in Heritance from a super class is called asset class. Inheritance in different relationships between classes and organises classes into groups
State the purpose of Backus-Naur form (BNF
BNF is used to describe (unambiguously) the syntax/grammar of a programming/computer language.
why Backus-Naur Form (BNF) is preferable to ordinary English or Welsh when defining the syntax of a computer language
It is unambiguous
Explain the difference between a procedural and non-procedural programming language
Procedural languages are concerned with carrying out an ordered set of instructions
Non-procedural languages are to do with facts / rules / queries
4GL
· 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.
Visual Language
· 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
State when a scripting language might be used
A scripting language is often embedded in other languages and can add functionality to web pages
Explain why careful version control is necessary when developing computer programs
· 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.
Explain the role of a break point when debugging a program
Break point: allows the programmer temporarily to halt execution in order to ascertain the value of variables at that point