Types of Programming Language | OCR A-Level Computer Science (H446)
Types of Programming Language
- 64 questions
- 5 subtopics
- Component 01: Computer systems
- Component 01
Types of Programming Language is examined on component 01 of OCR Computer Science, Computer systems.
64 recall questions across 5 subtopics.
Sample questions from Types of Programming Language
Answer each one closed book first, then open the answer.
-
Programming paradigms and procedural languages
What is a programming paradigm?
Show the 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. -
Assembly language and the Little Man Computer
What does the DAT instruction do in the Little Man Computer, and why is it not really an instruction?
Show the answer
It reserves a mailbox to hold data rather than a program instruction, and optionally sets its initial value. It is an assembler directive: it generates no operation for the processor to carry out, it simply tells the assembler to set that memory location aside, usually with a label so the program can refer to it by name. -
Modes of addressing memory
In immediate addressing, what does the operand actually mean?
Show the answer
The operand is the data itself. No memory access is needed to fetch it, because the value to be used is held in the instruction, so the processor simply uses it. If the instruction is LDA with immediate addressing and the operand is 7, the accumulator is set to 7. -
Modes of addressing memory
In indexed addressing, what does the operand actually mean?
Show the answer
The operand is a base address, to which the current contents of the index register are added to give the effective address of the data. The data is then fetched from that calculated address. Changing the index register changes which location the same instruction reaches. -
Object-oriented programming: classes and objects, attributes and methods, encapsulation
What is a method?
Show the answer
A subroutine defined inside a class that describes something an object of that class can do, or something that can be done to it. It normally operates on that object's own attributes. A BankAccount class might have methods deposit, withdraw and getBalance, so the behaviour that changes the balance lives with the balance itself. -
Object-oriented programming: inheritance, polymorphism, advantages and disadvantages
What is polymorphism?
Show the answer
The ability of objects of different classes to respond to the same method call in their own appropriate ways. Code can call a method by name on an object without knowing exactly which class the object belongs to, and the version of the method that actually runs is the one defined by the object's own class.
The 5 subtopics
One subtopic is one session. Work down the list.
| Subtopic | What it covers | Questions |
|---|---|---|
| Programming paradigms and procedural languages | Recall 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. | 12 |
| Assembly language and the Little Man Computer | Recall 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. | 17 |
| Modes of addressing memory | Recall 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. | 13 |
| Object-oriented programming: classes and objects, attributes and methods, encapsulation | Recall questions on classes, objects and instantiation, attributes and methods, encapsulation, getters and setters, and a concrete example of the problem encapsulation prevents. | 9 |
| Object-oriented programming: inheritance, polymorphism, advantages and disadvantages | Recall 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. | 13 |
How the guide is worked
Answering a question from memory stores it far better than reading the answer again. The guide runs that as a fixed procedure on one subtopic at a time, about twenty minutes a session.
-
Step 1 · Closed book
Cover the answers. Work through one subtopic and write down what you can. Leave blanks where you have nothing.
-
Step 2 · Open book
Go back to the top. Read each printed answer and write it out in full, including the ones you had right.
-
Step 3 · Closed book again
Same questions, same order, from memory. The gap between pass one and pass three is the session result.
Read the full method, the return schedule and the research behind it.
Nearby topics
OCR A-Level Computer Science Active Recall Guide
Every topic, not just this one. 1,549 questions with their answers.