Font size
Worksheets1.4 principles of programming
Total questions: 17
Worksheet time: 13mins
Each line of high level language equates to ______ ______ of machine code
(a)
A situation that would require the use of a low level language is:
Device drivers
using long and meaningful identifiers
writing a module that can be reused.
using a mark-up language
what programming paradigm uses classes?
procedural
visual
object-oriented
mark-up
A class is a programming (a) for creating objects
Backus-Naur form is used to
describe the operating system in a computer
decode assembly instructions
describe unambiguously the syntax of a programming language
describe the instructions for a particular chip set
Which of these pictures shows recursion in BNF form?
This symbol ::= in Backus-Naur form means:
OR
AND
is defined by
is equal to
An advantage of using a procedural language to write a program based on an algorithm is:
is more modular than an object-oriented language
allows the programmer to wait for an event before activating a procedure.
can be used to create a web page.
Allows the programmer to define precisely each step when performing a task
Final output values in Backus-Naur are called
(a)
OR in Backus-Naur is written as
|
¬
::=
::
Assuming digit and letter have been defined as above. How would you define in BNF a name that is made up of uppercase letters. The name could be any length.
(a)
using the variable digit that is already defined. Define a variable using BNF called 3digit that represents a number within the range 0-999.
Do not include spaces.
(a)
A method defined inside a class
defines an object's attributes
defines an object's behaviour
creates an instance of the class
Would create an error.
encapsulation
Methods are inherited from the parent class
a function within a function to create a namespace.
technical implementation is hidden within the object
variables are all global
A natural language interface
Lets 2 computers communicate using spoken language
Is a low level way of communicating with a computer
Is a way of creating a computer generated voice
Lets you communicate with a computer in your everyday language.
In a non-procedural language you specify the results you want without specifying how to solve the problem
True
False
A high level language must be unambiguous
So that there are no grey areas.
So that there are many ways to interpret each programming statement.
so that there is only one way to interpret each program statement.
So that the programmers can express functions correctly
