Chapter 19 Contemporary Trends In Software Development Flashcards
What are the two GCSE programming paradigms?
Procedural paradigm and object-oriented paradigm.
Explain what Procedural programming is? (x3)
• Procedural programming languages provide features to help programmers design solutions using a top-down approach.
• Top-down design involves breaking a complex problem down into smaller sub-problems.
• Solutions for each sub-problem can be created and the code for the solutions can be written as functions (also called procedures or methods).
Explain what Object-oriented Programming is? (x3)
Object-oriented programming languages provide features to help programmers design solutions using objects.
Objects contain both the data (properties) and the functions (methods) to be used in the solution.
A class is like a template or blueprint for an object; it defines the properties and methods for a group of objects.
What is inheritance?
It allows programmers to build one class based on another class i.e one class can inherit the characteristics of another class. In this subclass only the differences between it and its parent class need to be coded.
What is encapsulation?
It ‘hides’ the data belonging to an object. The data can only be accessed through the methods associated with the object. Therefore the object-oriented approach creates more efficient, reusable code.
What is encapsulation?
It ‘hides’ the data belonging to an object. The data can only be accessed through the methods associated with the object. Therefore the object-oriented approach creates more efficient, reusable code.
What are the advantages and disadvantages of POP?
Advantage:
It needs less memory than OOP.
Disadvantage:
It’s less secure than OOP.
What are the advantages and disadvantages of OOP?
Advantage:
It is more secure than POP.
Disadvantage:
It needs more memory than POP.
What does SDE/IDE stand for and what is it?
It stands for Software Development Environment and is also known as an Integrated Development Environment.
Most programmers now write code in an SDE/IDE as they provide programmers with an integrated set of programming tools to build an application from coding through to testing.
What tools do SDE/IDEs provide? (x6)
An editing window that allows the programmer to enter and edit code; it also provides access to objects, methods, properties and events at design time.
A clipboard, used to copy and paste.
Colour, used throughout the coding window to aid readability for the programmer; the editor may use different colours for keywords and syntax errors may also be colour coded.
Collapsible code sections: programmers can collapse/expand selected sections of code to make viewing large programmes much easier.
Line numbering: helps programmers distinguish between lines in long programs, line numbering is also used by the compiler to reference the location of errors in the code.
Code completion tools: when writing code there is instant, automatic, context-sensitive help; as a statement is entered, its full syntax may be shown to the programmer. Code completion tools may provide a list of available functions, statements, constants or values that the programmer can choose from.
What is the source code?
It is the program written by the programmer.
What is the machine code?
Machine code is: instructions in binary format that can be executed directly by the computer.
What must happen to source code and why?
It must be translated via a compiler into machine code so that the computer can understand and execute the instructions.
What is a language compiler?
It is built into the SDE. It processes each statement in the source code and tries to translate the whole program into machine code, before executing it.
What passes will the compiler perform on the code?
- If the program uses libraries, the compiler will include the library code used in the program (this is called pre-processing).
- During lexical analysis, the compiler converts source code into fixed-length binary code items called ‘tokens and parsing’(or syntax analysis), which checks that the statements conform to the rules of grammar for the language.
- Syntax analysis will check the syntax of each statement. If the syntax is incorrect, the program won’t be executed. The programmer then has to correct the errors before attempting to compile the program again.
- Semantic analysis ensures that any variables used have been declared and data types are correctly matched.
- After these passes, the optimised machine code of the source code is generated and can be executed.