Unit 4 - Chapter 1 Flashcards
What is a program ?
A set of instructions that tells the computer to do things in a certain order to solve a particular problem
What are the two main programming paradigms ?
+ procedural paradigm
+ object-oriented paradigm
Explain the procedural paradigm
the program operates on data and is in self contained blocks called ‘procedures’. The programme is started by calling the procedures
Explain the object-oriented paradigm
The focus is on data, the data and the code that operate on the data are kept in a single object class.
What does procedural paradigm help to do ?
It helps to break large pieces of code into easier to manage chunks of code called procedures
What does inheritance allow the programmer to do ?
to build one class based on another class, (one class can inherit the properties of the other)
What does encapsulation help to do ?
‘hides’ the data belonging to an object
What are the advantages of object-oriented programming ?
- the code for an object can be used in a different programme
- access to the the objects data is hidden (due to encapsulation)
What is a software development environment ?
provides programmers with programming tools to build an application through coding and testing
What are syntax errors ?
An error in the code entered into the editor e.g spelling mistake
Name 5 features of an SDE
- editing window
- clipboard
- syntax errors
- line numbering
- collapsible code section
What is machine code ?
instructions in binary format that can be executed by a computer
What is source code ?
The original code written by the programmer
What does a language compiler do ?
it processes each statement in the source code and tries to translate it into machine code, before executing it
What are the main steps in high-level language translation ?
- first pass will check the syntax of each statement
- the compiler converts source code into binary code
- semantic analysis ensure that any variables used have been declared
- the machine code is ready to be executed