Software Development: Languages and Environments Flashcards
Name 4 types of programming languages
- Procedural
- Declarative
- Event-Driven
- Scripting
What is a Procedural language? (2) Give an example of a Procedural language (1)
- Procedural languages have a clearly set start and end point to the program
- The program follows a pre-defined pathway through the instructions to solve the problem
- Pascal is a Procedural language
What is a Declarative language? (2) Give an example of a Declarative language (1)
- A Declarative language allows the programmer to create a knowledge base which contains facts and rules about a problem.
- A query is then used to interrogate knowledge base and draw conclusions
- Prolog is a Declarative language
What is an Event-Driven language? (2) Give an example of an Event-Driven language (1)
- An Event-Driven language does not have a specific pathway in which the program instructions are executed
- Different parts of the program are evoked by events that take place during the running of a program, such as the user clicking on a command button
- Visual Basic is an Event-Driven language
What is a Scripting language? (2) Give an example of a Scripting language (1)
- Scripting languages are provided with an application package to allow the user to go beyond the features available in the application
- They allow an expert user to customise the package and can be used to automate repetitive tasks
- Javascript is a Scripting language
Name 2 features of a Scripting language
- They allow new functions to be added to existing software.
* They can automate repetitive tasks or operations
What is a Macro?
A Macro is a set of actions performed by the user that have been recorded and can then be played back when required
What are 2 benefits of using a Scripting language?
- To allow users to extend the functionality of an application
- To increase productivity through use of macros, which automate repetitive tasks
What is a Compiler?
A Compiler is a translator that translates the entire source code into machine code before a program is run
What is an Interpreter?
An Interpreter is a translator that translates source code one instruction at a time and executes it when the program is run
What is an advantage of using a Compiler over an Interpreter? (2)
- Compiled programs run fast, as it has been translated before it’s run
- Interpreted programs run slower, as time is taken to translate code when the program is running
What is an advantage of using an Interpreter over a Compiler? (2)
- Interpretors highlight errors immediately as it only translates one instruction at a time
- Compiled programs have to be compiled again before being run and tested if an error occurs
What is a module library?
It is a collection of pre written subroutines that are available to a programmer to speed up the software development process
What are 2 advantages of using a module library?
- Time is saved in not having to write the same programming code over and over again
- The module will have been pre tested, so will be free from errors
What 2 pieces of documentation will there be in modules from a module library?
- A description of the function of the module
* The parameters that are passed in and out of the module and their data types