levo

Principles of Programming

Choosing a language for a problem

  • 3 things to know
  • AS Unit 1
Start revising · £5/month

Overview

Recall questions on the factors behind the choice, which kind of language suits a payroll run, an event-driven desktop application, a simulation of many similar entities, a 2 kB microcontroller and a web page, and how staff experience, existing code, hardware and time affect it.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

State three factors that influence the choice of programming language for a project.

Key term

Which approach suits a simulation containing many similar interacting entities, and why?

Key term

Which kind of language would be chosen for code that must fit into 2 kB of memory on a microcontroller?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    State three factors that influence the choice of programming language for a project.

    Model answer

    The nature of the problem, the hardware the solution must run on, and the experience of the programmers available are three.

  2. 2

    Which kind of language suits a payroll system that reads a file of employee records and prints payslips, and why?

    Model answer

    A high-level procedural language suits it, because the work is a fixed sequence of file handling and arithmetic applied to every record with no user interaction.

  3. 3

    Which paradigm suits a desktop application driven by buttons and menus, and why?

    Model answer

    An event-driven approach suits it, because the user decides the order in which controls are used and each control needs its own independent response.

  4. 4

    Which approach suits a simulation containing many similar interacting entities, and why?

    Model answer

    An object-oriented approach suits it, because each entity becomes an object holding its own state, and one class defines the behaviour shared by all of them.

  5. 5

    Which kind of language would be chosen for code that must fit into 2 kB of memory on a microcontroller?

    Model answer

    A low-level language would be chosen, because hand-written instructions occupy far less space than compiled high-level code.

  6. 6

    Which kind of language is appropriate for describing the structure of a web page?

    Model answer

    A mark-up language is appropriate, because the page's headings, paragraphs and links are structure to be described rather than instructions to be executed.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

Fetch, , execute.
decodecompilestore

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Principles of Programming, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.