OCR A-Level Computer Science H446
Processors: Structure, Performance and Types
Input, Output and Storage
Systems Software
Applications Generation
Software Development
Types of Programming Language
Exchanging Data
Networks
Web Technologies
Data Types and Number Representation
Data Structures
Boolean Algebra
Legal, Moral, Cultural and Ethical Issues
Elements of Computational Thinking
Problem Solving and Programming
Algorithms
Types of Programming Language
- 5 subtopics
- 13 things to know
- Component 01
What Types of Programming Language covers
Types of Programming Language is examined on component 01 of OCR Computer Science, Computer systems. 64 recall questions across 5 subtopics.
Where it is assessed
Component 01
Computer systems, the whole of the first paper.
Check the OCR specification ↗The 5 subtopics
Each one has its own page.
- Programming paradigms and procedural languagesRecall questions on programming paradigms and why more than one is needed, procedural languages and their features, object-oriented, declarative, functional, logic and event-driven paradigms, low-level languages, and multi-paradigm languages.Open →
- Assembly language and the Little Man ComputerRecall questions on assembly language and its instruction format, the Little Man Computer, its accumulator and DAT, tracing and writing LMC programs with BRA, BRZ and BRP, value limits, and executing an ADD instruction.Open →
- Modes of addressing memoryRecall questions on immediate, direct, indirect and indexed addressing, what the operand means in each mode, working out what LDA loads under each mode, using indexed addressing for arrays, and memory accesses per mode.Open →
- Object-oriented programming: classes and objects, attributes and methods, encapsulationRecall questions on classes, objects and instantiation, attributes and methods, encapsulation, getters and setters, and a concrete example of the problem encapsulation prevents.Open →
- Object-oriented programming: inheritance, polymorphism, advantages and disadvantagesRecall questions on inheritance with superclasses and subclasses, polymorphism and method overriding, the difference between encapsulation, inheritance and polymorphism, and the advantages and disadvantages of object-oriented programming over procedural.Open →
What you need to know
Answer each one before you reveal it.
What characterises a declarative paradigm, and how does it differ from an imperative one?
What characterises the logic paradigm?
In the Little Man Computer, what is the difference between BRA, BRZ and BRP?
A student uses BRP to loop while a counter is greater than zero, and finds the loop runs one time too many. Explain.
In immediate addressing, what does the operand actually mean?
In direct addressing, what does the operand actually mean?
What is an attribute?
Explain the difference between an attribute and a method, and between a class and an object.
What is inheritance?
Give an example of inheritance with a superclass and two subclasses.
What is polymorphism?
Name the four modes of addressing memory.
Take Types of Programming Language further
The same content, four other ways.
Commonly confused
Pairs that lose marks when they are blurred together.
A class vs An object
A class: the template defining the attributes and methods that its instances will have. An object: one instance created from that template, with its own values.
An attribute vs A method
An attribute: a data item belonging to an object, describing part of its state. A method: a procedure belonging to an object, defining something it can do.
Encapsulation vs Inheritance
Encapsulation: keeping an object's data private and reachable only through its own procedures. Inheritance: defining a new class that takes on the members of an existing one and extends them.
Questions from this topic
Each one with the model answer underneath.
- 1
What is a programming paradigm?
Model answer
A style or approach to programming - a whole way of thinking about how a program should be organised and what a program fundamentally is. It determines how the problem is broken down, how data and instructions are represented and how the flow of the program is controlled, rather than merely which keywords are typed.
- 2
Why is there a need for more than one programming paradigm?
Model answer
Different kinds of problem have different natural shapes, and a paradigm that fits the shape of the problem produces code that is shorter, clearer and less likely to be wrong. Controlling a machine step by step suits a procedural approach; modelling a system of interacting real-world things suits objects; expressing a set of facts and rules and letting the machine search suits a declarative approach; responding to unpredictable user actions suits an event-driven one. Hardware and the size of projects have also changed over time, and paradigms developed to manage the growing complexity.
- 3
What characterises the procedural paradigm?
Model answer
The program is a sequence of instructions telling the computer step by step what to do, in a stated order, using the three basic constructs of sequence, selection and iteration. Data is held in variables that the instructions read and change, and the instructions are grouped into procedures and functions that can be called from elsewhere. It is imperative: the code says how the task is to be carried out.
- 4
Name three features you would expect to find in a procedural language.
Model answer
Variables and data types for storing values; the control constructs of sequence, selection and iteration; subroutines - procedures and functions - with parameters and local variables; and usually arrays and other structured data types. Examples of procedural languages include C, Pascal and Python used in a procedural style.
- 5
What characterises the object-oriented paradigm?
Model answer
The program is organised as a set of objects that each bundle together their own data and the operations that act on it, and that interact by calling one another's methods. Objects are created from classes, which act as templates, and classes can inherit from other classes. Data is deliberately hidden inside objects rather than being globally available.
- 6
What characterises a declarative paradigm, and how does it differ from an imperative one?
Model answer
A declarative program states what is wanted rather than how to obtain it, leaving the system to work out the steps. An imperative program - procedural or object-oriented - spells out the sequence of operations. A database query that asks for all customers in a given town is declarative; a loop that examines each record in turn and adds the matching ones to a list is imperative.
What is inside Levo
Six ways to work the same material.
Types of Programming Language revision questions
- What does Types of Programming Language cover in OCR A-Level Computer Science?
- 5 subtopics: programming paradigms and procedural languages, assembly language and the little man computer, modes of addressing memory, object-oriented programming: classes and objects, attributes and methods, encapsulation and object-oriented programming: inheritance, polymorphism, advantages and disadvantages. Each one has its own page with questions and model answers.
- How is Types of Programming Language organised?
- By the OCR H446 specification, subtopic by subtopic, so it matches the order you are taught it in.
Every question in Types of Programming Language, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.