Revision Questions

1. A bank manager uses a macro once a month to create an alphabetical list of customers whose account balance is over £5000.
(a) State two benefits of using macros for this type of task.

Two benefits of using a macro for this task are there will be less chance of human error and it will be easier because a macro can perform difficult tasks recorded by another user with a higher skill level.

(b) The macro is written in a high level language. State the type of high level language that is used to write macros.

The type of high level that is used to write macros is Scripting Language.

2. A program contains the following statement:
is_a (rover, dog).
State which type of programming language is being used.

This is called Declarative language (declares all the facts and rules).

3. A holiday booking website includes a currency converter which asks for the amount in pounds sterling and converts it to euros. Here is the top-level algorithm, including data flow for steps 1 and 2.
1. get amount of pounds (out: pounds)
2. calculate euros (in: pounds out: euros)
3. display conversion

(a) State which design notation is being used.

This is called pseudocode.

(b) Step 3 results in the following being displayed on screen:
£500 converts to 750 euros.
State the data flow for step 3.

It will come out in pounds  followed by euros.

(c) Identify whether the pounds variable in step 1 should be passed by value or passed by reference. Explain your answer.

It should be passed by reference. This is because the variable is passed in and out.

4. Explain the purpose of a CASE statement in a high level language.

A case statement involves two or more decisions and a case statement means the user can avoid the use of multiple or nested if statements.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s