Software Types and Language Translators: Question 5
Syllabus 4.2
A robotics club member has finished writing the control program for a line-following robot in an IDE. Before testing it on the physical robot, they want to execute the program immediately inside the IDE itself, so that any messages the program prints are displayed on screen straight away, without opening a separate program to run the code.
Which feature of the IDE provides this?
Show worked solution Hide worked solution
Worked solution
Step 1: Recall what each IDE feature does
- Auto-completion predicts and suggests the rest of a keyword or variable name while the programmer is still typing it.
- Prettyprint automatically formats and re-indents code so that it is easier to read; it does not run the program or affect its output.
- Auto-correction automatically fixes certain typing mistakes as code is entered, again before the program is run.
- Run-time environment allows the program to be run directly inside the IDE, so the programmer can see the output the program produces without leaving the IDE or using a separate program to run the code.
Step 2: Match the description to a feature
The club member wants to run the finished program straight away and see what it prints. This is about executing the program and viewing its output, not about typing, formatting or spelling assistance, all of which only act on the code before it is run. That rules out auto-completion, prettyprint and auto-correction.
Step 3: Confirm the match
Only the run-time environment lets the program be run from within the IDE and shows the programmer the output the program produces, which is exactly what is needed here.
Final answer
The feature being described is the run-time environment, option C.