Font size
WorksheetsTopic D - Types of programming and mark up languages
Total questions: 24
Worksheet time: 17mins
In Procedural programming, code is executed step by step or line by line. Procedural code includes:
(tick all appropriate)
Statements
Blocks
Procedures
Functions
Events
Programming involves sequence, selection and iteration. Tick all appropriate descriptions of iteration.
repetition of code
Looping of code
IF statement
For Loop
Condition
What is not an advantage of procedural programming?
Debugging can be difficult if you have thousands of lines of code.
Code is modular, so programs can be written separately by different people at once.
It is easy to follow for small programs
Flexibility – most procedural languages can create and execute code on multiple machines.
Object Oriented Programming (OOP) is an approach to problem solving where all computations are carried out using objects.
TRUE
FALSE
In Object Oriented Programming a class is a set of related (a) that share common characteristics.
Object Oriented Programming features include:
(tick all appropriate)
Service oriented processing
Inheritance
Encapsulation
Polymorphism
Reusability
In Object Oriented Programming, Inheritance is the ability to create derived (or child) classes from a base class in order to reuse existing code.
TRUE
FALSE
Select all the benefits of Object-Oriented programming.
Code Reusability
Complex Design
Real Word Entities are used
Abstraction
Classes are used in Object-Oriented Programming.
Select the two advantages of a classes.
Classes can be saved and reused in other parts of the program.
Classes can be complicated to program.
Code is complex and lengthy
When classes are setup, instances of the class can be used multiple times.
Encapsulation is used in Object Oriented Programming.
Select all the correct statements regarding encapsulation.
Encapsulation is the container that
can hide data inside an object
Encapsulation is a class which contains
data (properties) and functions (methods)
Encapsulation is used to hide the internal "workings" of an object from the outside. This is called information hiding.
Encapsulation is Information in a module or section of code that enables the program to use code contained within a program.
Event-driven programming produces code that is determined by (a) such as user actions, sensor outputs, or message passing from other programs.
In Event-Driven Programming the main loop...
(select 3)
allows the program to receive events continuously
is effectively listening for different events to occur.
is not usually coded but provided by the programming environment
is a large hoop spun round the body by gyrating the hips, for play or exercise.
Select all the events that could occur in Event-Driven Programming
The Cup Final
MouseDown
MousePress
DoubleClick
Why are event-driven programming languages suitable for creating user interfaces?
The program responds to individual user actions which will run a specific block of code.
The program follows a step by step list of instructions.
In event-driven programming, what is the purpose of a trigger function?
starts a specific block of code based on a user action
Allows the user to play shooty games like GTA
In event-driven programming, what is service oriented processing?
is the breaking down of complex problems into a collection of separate processes, each providing a specific service for client applications.
this is used by event loops to identify and launch a response to an event that has happened in an event loop.
When coding for the web, why would a programmer use server side processing? (pick two)
reduces duplication
Cost effective
reduces the processing load on the user's computer
Tick all the benefits of using a web based application instead of installing the app on the device.
There is no need to worry about the performance of your own device.
Most processing is done on a server (normally) owned by the company which runs the application.
Platform independence - A website will run on any operating system with a web browser.
Not all browsers are capable of working with all web technologies, and appearances can shift from device to device.
What is Client-side processing?
Processing is performed by the web browser on the machine being used by the client.
This is where a request is made to the server; it processes the data and produces a web page based on these requests.
What is Server-side processing?
Processing is performed by the web browser on the machine being used by the client.
This is where a request is made to the server; it processes the data and produces a web page based on these requests.
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.
Traffic - Web traffic is reduced and so less bandwidth is used.
Connectivity - Hosting applications on a server requires the user to be connected to the Internet
Performance - programs tend to rely on the speed of the network instead of the speed of the server running the application.
Compatibility due to vast amount of different browsers.
Select all the reasons for translating code from one language to another
Advances in programming tools and techniques
Changes in the weather
Changes in human–computer interaction
Changes in hardware and software
Change of client or their requirement
‘Translating code is beneficial for the user and the company that makes the product.’ Identify two points that support this statement
The programs might be unoptimised / buggy.
The translated program might support the addition of new features that are useful to the user.
Some features may be lost if the new language does not support all properties of the old one
Companies could be able to complete programs faster.
If you had to discuss the implications for developers of translating code into another programming language, what aspects could you look at?
Built-in functions
Price of cheese
Code Structure
Technical Support
Debugging facilities
