wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

2.1.2 Thinking ahead

Total questions: 16

Worksheet time: 8mins

Name
Class
Date
1.

What is the purpose of thinking ahead?

a)

To make programs easy and intuitive for users to use.

b)

selecting data from a larger pool to show only the relevant details to the object. It helps to reduce programming complexity and effort.

c)

break down your project scope into manageable chunks.

d)

observe and analyze phenomena, reactions, and feedback and then draw conclusions based on that input.

2.

Define inputs.

a)

Any data that is required to solve a problem, usually entered into the system by the user.

b)

Hardware peripherals

c)

The results that are passed back once the outputs have been processed and the problem solved.

d)

Open source software

e)

proprietary software

3.

Define outputs

a)

The results that are passed back once the inputs have been processed and the problem solved.

b)

Any data that is required to solve a problem, usually entered into the system by the user.

c)

Hardware peripherals

d)

Open source software

e)

proprietary software

4.

What considerations do programmers need to make regarding inputs and outputs when thinking ahead?

a)

Method of input/output (device used)

b)

Data structures used

c)

Data types used

d)

Order of data

5.

Identify the inputs that are likely to be used in a book reservation system i.e. at a library.

a)

Book details: name, author

b)

ISBN

c)

Borrower details: name, library card<br />number

d)

Collection point

e)

Book cost

6.

Identify the outputs that are likely to be used in a book reservation system i.e. at a library.

a)

Expected waiting time

b)

Confirmation

c)

Availability at other libraries

d)

Book cost

e)

Borrower details: name, library card number

7.

What are preconditions?

a)

Requirements which must be met before a program can be executed.

b)

Requirements which must be met before a program can be designed.

c)

Requirements which must be met before a program can be concieved.

d)

Requirements which must be met before a program can be tested.

8.
Where can preconditions be defined?
a)
Within the code or within documentation.
b)
Within the code
c)
Within documentation
9.

State two advantages of including preconditions within the documentation accompanying a subroutine.

a)

Reduces the length of the program

b)

Reduces the complexity of the program

c)

Reduces the running time of the program

d)

Reduces the length of the documentation

10.

Define caching.

a)

The process of storing instructions or values in cache memory after they have been used, as they may be used again.

b)

Requirements which must be met before a program can be executed.

c)

Requirements which must be met before a program can be designed.

d)

Requirements which must be met before a program can be concieved.

e)

Requirements which must be met before a program can be tested.

11.

How is caching used in storing web pages?

a)

Web pages that a user frequently accesses are cached, so the next time one of these pages is accessed, content can be loaded without any delay.

b)

The process of storing instructions or values in cache memory after they have been used, as they may be used again.

c)

Requirements which must be met before a program can be executed.

d)

As developing from scratch is not required, this saves time, money and resources.

12.

What are the advantages of caching web pages?

a)

Content can be loaded without delay

b)

Images and text do not have to be downloaded again multiple times

c)

Frees bandwidth for other tasks on a network

d)

Less time is spent waiting

e)

Accuracy of the algorithms used

13.

What is the name given to the technique in which instructions are fetched based on algorithms which predict which instructions are likely to soon be used?

a)

Prefetching

b)

Caching

c)

Preconditions

d)

Reusable Components

14.

Give a limitation of caching.

a)

Accuracy of the algorithms used

b)

Effectiveness of algorithm in managing the cache

c)

Content can be loaded without delay

d)

Images and text do not have to be downloaded again multiple times

e)

Less time is spent waiting

15.

Give some advantages of using reusable program components.

a)

More reliable than new components, as they have already been tested

b)

As developing from scratch is not required, this saves time, money and resources.

c)

Frees bandwidth for other tasks on a network

d)

Content can be loaded without delay

e)

Reduces the length of the documentation

16.

Give two examples of reusable program components

a)

Abstract data structures eg. queues and stacks

b)

Classes

c)

Prefetching

d)

Preconditions

e)

Caching