Lesson T2.3.2
T2.3.2 Designing and developing modular programs Quiz: KS3 Computing, Unit 2
20 questions
In partnership with Revision Ninja
Lesson T2.3.2, Designing and developing modular programs: 20 multiple choice questions for the KS3 Computing (National Curriculum), Unit 2: Programming, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
What does modular design mean?
- Writing all the code in one long file with no structure
- Splitting a program into separate parts, each with a clear job
- Removing every procedure and function from the code
- Designing the program so it can only run on one device
-
Why is it helpful to test each module separately?
- Each module must be tested with a different computer
- Modules cannot be tested unless the program is printed
- A fault is easier to find when only one part is tested at a time
- Testing modules separately means the whole program never needs testing
-
A team designs a quiz program. Which part is a sensible module?
- The colour of the title text on the screen
- The name of the file on the teacher's desktop
- A single variable named x
- A function that checks whether an answer is correct
-
What is an advantage of modular design for a team?
- Different people can work on different modules at the same time
- Team members must all write exactly the same code so it stays consistent
- Modules stop the team from sharing any work between members of the group
- Only one person can ever work on the program because it is a single file
-
A module is changed to fix a bug. What is a benefit of modular design here?
- Every module must be rewritten from scratch
- Other modules can often stay unchanged
- The whole program must be deleted and retyped
- The bug is copied into every other module
-
What is an interface between two modules?
- A copy of one module stored inside another so they can share code
- The memory address of the first module stored in the computer
- The colour used to draw the modules on the screen during testing
- The agreed inputs and outputs that let them work together
-
Why should a module be designed to do one job?
- So that it can only be used by one program
- So that it can do many unrelated tasks at once
- So that it never needs any input data
- So that it is easier to understand, test and reuse
-
A program is split into a login module, a scoring module and a display module. What is this an example of?
- Modular design
- A spreadsheet with formulas
- A single long list of numbers
- A block of text in a word processor
-
What should a programmer do before writing the modules of a program?
- Plan how the program will be divided and how the parts will connect
- Choose the colour of the program's icon and the font for its menus
- Delete all the variables from the design so the plan stays simple
- Write the final printed manual for users before any code is written
-
Which is a risk of having no modular structure in a large program?
- Programmers can reuse code without any effort
- A change in one place can break many other parts
- Errors are always found immediately
- Each part becomes easy to test separately
-
What is reusability in modular programming?
- Copying the same code many times into one file so it is easy to find
- Deleting a module after it has been used once so that space is saved
- Using the same module in different programs or parts of a program
- Storing modules on paper rather than a computer so they are never lost
-
A module is tested alone and works. It is then joined to another module and fails. What is the most likely cause?
- The first module has become a list of numbers
- The interface between the two modules does not match
- The computer has run out of colour
- The module was named with a capital letter
-
Why should modules be well named and clearly documented?
- So that the computer runs them faster by reading the names first
- So that other people can understand and use them correctly
- So that they never need to be tested once they have been written
- So that they can store more data in memory while the program runs
-
Which is a good way to divide a game into modules?
- Movement, scoring and the display of the screen as separate parts
- A module for each letter of the alphabet used in the game's text
- A module for every individual pixel on the screen, so each is controlled
- One module containing every line of the game, so nothing is split up
-
A programmer copies the same block of code into five places. What modular approach would improve this?
- Leave the copies in place to make the program longer
- Put the code in one procedure and call it five times
- Delete four of the copies and leave the program broken
- Change the colour of each copy so they look different
-
What is a benefit of testing a module with a set of known inputs and expected outputs?
- It makes the module run faster on every computer
- It removes the need to test the rest of the program
- It shows whether the module gives the correct results
- It proves the module will never fail in any situation
-
A program is designed in modules, but the modules keep needing to share one global variable. What is the better design?
- Store the variable in a picture instead
- Pass the values each module needs as parameters
- Make every variable global so that all modules can change it
- Remove all the modules and write one long program
-
Why is it useful to draw a diagram of a program's modules before coding?
- It replaces the need for any testing afterwards
- It makes the program run without any code being written
- It shows how the parts connect and helps spot problems early
- It stores the final output of the program
-
Which description best matches designing and developing a modular program?
- Build one module and never test it until the program is finished
- Plan the parts, build and test each one, then join them together
- Write all the code first and only think about structure at the end
- Avoid planning so that the program can change at any time
-
Which is a common way to share a module between two programs?
- Delete the module from both programs
- Copy the whole program onto a printer
- Rename every variable to the same name
- Import it from a shared file
Related quizzes
- Solving problems with two or more programming languages Quiz · T2.1.1 · 20 questions
- Textual programming languages Quiz · T2.1.2 · 20 questions
- Lists, tables and arrays Quiz · T2.2.1 · 20 questions
- Procedures and functions Quiz · T2.3.1 · 20 questions
- Computational abstractions of real-world systems Quiz · T1.1.1 · 20 questions
- AND, OR and NOT Quiz · T3.1.1 · 20 questions
- Hardware and software components Quiz · T4.1.1 · 20 questions
- Combining applications across devices Quiz · T5.1.1 · 20 questions
- Using technology safely, respectfully and responsibly Quiz · T6.1.1 · 20 questions
- Sorting algorithms Quiz · T1.2.1 · 20 questions