wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Topic D - Types of programming and mark up languages

Total questions: 24

Worksheet time: 17mins

Name
Class
Date
1.

In Procedural programming, code is executed step by step or line by line. Procedural code includes:

(tick all appropriate)

a)

Statements

b)

Blocks

c)

Procedures

d)

Functions

e)

Events

2.

Programming involves sequence, selection and iteration. Tick all appropriate descriptions of iteration.

a)

repetition of code

b)

Looping of code

c)

IF statement

d)

For Loop

e)

Condition

3.

What is not an advantage of procedural programming?

a)

Debugging can be difficult if you have thousands of lines of code.

b)

Code is modular, so programs can be written separately by different people at once.

c)

It is easy to follow for small programs

d)

Flexibility – most procedural languages can create and execute code on multiple machines.

4.

Object Oriented Programming (OOP) is an approach to problem solving where all computations are carried out using objects.

a)

TRUE

b)

FALSE

5.

In Object Oriented Programming a class is a set of related (a)   that share common characteristics.

6.

Object Oriented Programming features include:

(tick all appropriate)

a)

Service oriented processing

b)

Inheritance

c)

Encapsulation

d)

Polymorphism

e)

Reusability

7.

In Object Oriented Programming, Inheritance is the ability to create derived (or child) classes from a base class in order to reuse existing code.

a)

TRUE

b)

FALSE

8.

Select all the benefits of Object-Oriented programming.

a)

Code Reusability

b)

Complex Design

c)

Real Word Entities are used

d)

Abstraction

9.

Classes are used in Object-Oriented Programming.

Select the two advantages of a classes.

a)

Classes can be saved and reused in other parts of the program.

b)

Classes can be complicated to program.

c)

Code is complex and lengthy

d)

When classes are setup, instances of the class can be used multiple times.

10.

Encapsulation is used in Object Oriented Programming.

Select all the correct statements regarding encapsulation.

a)

Encapsulation is the container that

can hide data inside an object

b)

Encapsulation is a class which contains

data (properties) and functions (methods)

c)

Encapsulation is used to hide the internal "workings" of an object from the outside. This is called information hiding.

d)

Encapsulation is Information in a module or section of code that enables the program to use code contained within a program.

11.

Event-driven programming produces code that is determined by (a)   such as user actions, sensor outputs, or message passing from other programs.

12.

In Event-Driven Programming the main loop...

(select 3)

a)

allows the program to receive events continuously

b)

is effectively listening for different events to occur.

c)

is not usually coded but provided by the programming environment

d)

is a large hoop spun round the body by gyrating the hips, for play or exercise.

13.

Select all the events that could occur in Event-Driven Programming

a)

The Cup Final

b)

MouseDown

c)

MousePress

d)

DoubleClick

14.

Why are event-driven programming languages suitable for creating user interfaces?

a)

The program responds to individual user actions which will run a specific block of code.

b)

The program follows a step by step list of instructions.

15.

In event-driven programming, what is the purpose of a trigger function?

a)

starts a specific block of code based on a user action

b)

Allows the user to play shooty games like GTA

16.

In event-driven programming, what is service oriented processing?

a)

is the breaking down of complex problems into a collection of separate processes, each providing a specific service for client applications.

b)

this is used by event loops to identify and launch a response to an event that has happened in an event loop.

17.

When coding for the web, why would a programmer use server side processing? (pick two)

a)

reduces duplication

b)

Cost effective

c)

reduces the processing load on the user's computer

18.

Tick all the benefits of using a web based application instead of installing the app on the device.

a)

There is no need to worry about the performance of your own device.

b)

Most processing is done on a server (normally) owned by the company which runs the application.

c)

Platform independence - A website will run on any operating system with a web browser.

d)

Not all browsers are capable of working with all web technologies, and appearances can shift from device to device.

19.

What is Client-side processing?

a)

Processing is performed by the web browser on the machine being used by the client.

b)

This is where a request is made to the server; it processes the data and produces a web page based on these requests.

20.

What is Server-side processing?

a)

Processing is performed by the web browser on the machine being used by the client.

b)

This is where a request is made to the server; it processes the data and produces a web page based on these requests.

21.

Server side web based programs are generally very efficient but there are 3 main reasons why we don't use them for everything. Select all appropriate reasons.

a)

Traffic - Web traffic is reduced and so less bandwidth is used.

b)

Connectivity - Hosting applications on a server requires the user to be connected to the Internet

c)

Performance - programs tend to rely on the speed of the network instead of the speed of the server running the application.

d)

Compatibility due to vast amount of different browsers.

22.

Select all the reasons for translating code from one language to another

a)

Advances in programming tools and techniques

b)

Changes in the weather

c)

Changes in human–computer interaction

d)

Changes in hardware and software

e)

Change of client or their requirement

23.

‘Translating code is beneficial for the user and the company that makes the product.’  Identify two points that support this statement

a)

The programs might be unoptimised / buggy.

b)

The translated program might support the addition of new features that are useful to the user.

c)

Some features may be lost if the new language does not support all properties of the old one

d)

Companies could be able to complete programs faster.

24.

If you had to discuss the implications for developers of translating code into another programming language, what aspects could you look at?

a)

Built-in functions

b)

Price of cheese

c)

Code Structure

d)

Technical Support

e)

Debugging facilities