Science paper 1 EXAM
2024
what is composition? - ✔✔✔ANSWER-same aggregation but if the container is
destoryed the contained class is also destroyed
e.g. a hotel and rooms
What is data abstraction? - ✔✔✔ANSWER-similar to procedural abstraction but
with like data types, for example queues and stacks or how integers and real
numbers are represented in a computer
what is deterministic finite state machine - ✔✔✔ANSWER-if when in a particular
state the next state is uniquely determined by the input
, What is encapsulation? - ✔✔✔ANSWER-Encapsulation is the combining of data
and code into a single object.
What is erroneous data? - ✔✔✔ANSWER-Inputs that the program should not
accept. (outside the range/ wrong data typ)
"divide and conquer" algorithm - ✔✔✔ANSWER-halves the search area every
time a guess is made. e.g. binary search
Algorithm - ✔✔✔ANSWER-set of rules or sequence of steps stating how to solve
a problem. All have input, processing and output.
array - ✔✔✔ANSWER-finite, ordered set of elements of the same type
data structure - ✔✔✔ANSWER-collection of elementary data types such as
integer, real, boolean and built in methods to facilitate processing in some way
desribe an adjacency list - ✔✔✔ANSWER-nodes are listed on the left with an
arrow directing to boxes on the right
in the corresponding boxes there are the list of nodes that that node links to
curly brackets and a colon (to separate the node and the weight) are used for a
weighted graph
and square brackets are used for an unweighted one
dynamic list data structure - ✔✔✔ANSWER-internally implemented using a
linked list. Functional abstraction is used. As items are added the pointers are