Community resourceWorksheet

OCR H446 1.2.4 Programming Languages consolidation

Part 9 of 10 · H446 1.2.4 · Types of programming language

The consolidation piece for H446 1.2.4, bringing language choice, LMC execution, addressing modes and object-oriented design together in two running scenarios rather than revisiting each topic separately. No new content is introduced, so it suits a revision lesson or a checkpoint before assessment.

Students will:

  • recommend and compare language levels for a portable application and a memory-constrained controller
  • trace one LMC execution that accepts several inputs and produces cumulative outputs
  • explain the output fault caused by removing a store instruction
  • resolve all four addressing modes against a single supplied memory state
  • write a class hierarchy that combines a validated capacity change with an overridden display method

Inside: 5 explanation cells, 1 fill-in-the-blanks cell, 5 written answers and 1 trace table. 44 marks, about 55 to 70 minutes.

Series: H446 1.2.4 · Types of programming language, part 9 of 10.

Shared by Coding PathwayVerified teacher

  • 12 cells
  • About 60 minutes
  • CC BY-SA 4.0
  • Shared 31 Aug 2026
  • Updated 3 Sept 2026

Preview

The whole resource, exactly as a class sees it. Answers and marking are held back.

Programming Languages consolidation

Complete the sections in order, beginning with closed-book retrieval and then applying the ideas in the integrated contexts. No new required knowledge is introduced.

Episode A: levels, LMC and memory routes

A wildlife station uses a portable analysis application and a tiny custom radio controller. Answer from constraints, then inspect low-level state.

Written answer6 marks

Recommend a language level for each system and compare the two choices. The application is maintained on several operating systems; the controller has tight memory and needs direct radio-register access.

Use one matched comparison and apply every stated constraint.

Students type their answer here.

Trace table27 marks

Trace one execution supplied with inputs 6, 8 and 2 in that order. Record the accumulator, ITEM, TOTAL, each output, each return to START and the final HLT.

Record values only when they change. Record outputs in order and include the terminating state.

Use one row for each instruction carried out. Fill in a box only when that value changes on that row, and leave the rest blank. Put the address of the instruction being carried out in the Address column.

Inputs, in order: "6", "8", "2"

ProgramLMC assembly
00STARTINP01STA ITEM02LDA TOTAL03ADD ITEM04STA TOTAL05OUT06LDA ITEM07SUB MINIMUM08BRP START09HLT10ITEMDAT 011TOTALDAT 012MINIMUMDAT 5
Trace table with 5 columns
RowAddressACCITEMTOTALOutput
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Written answer8 marks

Explain why the outputs are cumulative and why the same execution accepts all three inputs. State the accumulator tested by each BRP, then explain the output fault if STA TOTAL is removed.

Distinguish the persistent TOTAL mailbox from the temporary accumulator and ITEM state. Follow the branch back to START rather than starting a new run.

Students type their answer here.

Written answer8 marks

Operand = 50, index = 2, memory[50] = 73, memory[52] = 11 and memory[73] = 6. Resolve immediate, direct, indirect and indexed modes, stating effective addresses and values.

Show each route rather than giving four unexplained values.

Students type their answer here.

Apply the ideas together

The next section combines earlier ideas in a changed context. Complete it independently, returning to a worked model only when you have identified a specific misconception to repair.

Episode B: object state, controlled access and common behaviour

A venue system stores bookable spaces. Different space types calculate a display label differently, but all must protect capacity from invalid changes.

Written answer12 marks

Write coherent OCR-style pseudocode for superclass Space with private name/capacity, a constructor and controlled setCapacity(newCapacity) that rejects values below 1. Add subclasses Room and OutdoorArea that override displayLabel() differently.

Keep class, constructor and instances distinct. Use one common method name for polymorphism.

Students type their answer here.

Written answer6 marks

A list contains one Room and one OutdoorArea. Explain what happens when a loop calls displayLabel() on both, and why direct external assignment space.capacity = 0 should be unavailable.

Connect actual type to override, then visibility to the invariant.

Students type their answer here.

Fill in the blanks4 marks
Assembly uses an checkpoint gap 1; immediate addressing uses a literal checkpoint gap 2; a constructor initialises an object from checkpoint gap 3; overriding supports checkpoint gap 4 through a common method call.

Review your responses

Use the evidence in your completed responses to identify the first model, state transition or reasoning link that needs improvement. Correct that point, then reapply it to the changed context.