computer science programming paper Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

what is a register

A

a temporary memory location located inside the CPU which is used for a single purpose

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

compare the efficiency of using a binary tree to a linked list when searching

A

the binary tree is more efficient as it removes half of the values at a time where a a linked list has to go through every single value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Compare the efficiency of a binary search tree to a hash table when searching for data.

A

binary tree is less efficient than a hash table, a hash table can find data immediately without having to look at other values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is an object

A

an instantiated class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

recursion

A

this a programming construct where the subroutine calls it self during execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

heuristics

A

a non-optimal way of solving a problem this finds an approximate solution TO A PROBLEM WHICH IS TIME CONSUMING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

performance testing

A

eliminates the need for true performance testing by providing mathematical methods to test on a variety of load son different operating systems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is the MAIN difference between functions and procedures

A

a function RETURNS a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is the difference between branching and iteration

A

branching decides which code is run and only runs the code once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

how to remove form a tree

A

find the node
replace the content of node with null
add to empty list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

similarities between trees and graphs

A

both made of nodes
both are connected by links

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

differences between tree and graphs

A

trees are one directional
trees will not be weighted(edges)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

differences between recursion and iteration

A

recursion uses more memory iteration uses less
recursion can run out of memory while iteration cannot run out of memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what are preconditions

A

requirements which must be met before a program can be executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is caching

A

storing instruction which have been used as they may be used again

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what are the limitations of caching

A

larger cache takes longer to search so cache size limits how much data can be stored

17
Q

reusable components (advantages)

A

subroutines- arguments can be changed to obtain a different output
saves money time and resources

18
Q

what is thinking procedurally

A

writing a program a lot simpler by breaking down each component of the problem into smaller parts(subroutines)

19
Q

what is the ultimate aim of thinking procedurally

A

breaking down a problem until each subproblem can be represented by a single task

20
Q

what is concurrent thinking

A

the process of completing related tasks at the same time

21
Q

what is concurrent processing used by

A

multicore processors

22
Q

what are the benefits of concurrent processing

A

number of tasks completed in a given time is increased
less time wasted waiting for an input or user interaction

23
Q

what are the drawbacks of concurrent processing

A

switching between tasks reduces programming throughput
when a large sample is dealt with it will take longer to complete as it cannot be completed at once
there are some scenarios where this type of thinking will not be suited as some problems cannot be broken down into concurrent tasks

24
Q

what are the three features of IDE

A

stepping - this allows to monitor the effect of each individual line of code
debugging - provides run-time detection of errors which can show where in the code it occurred
breakpoint- this allows programmers to choose points where the program stops, this can help pinpoint logical errors

25
Q

what is the difference between passing by reference and by value

A

by reference it will change the actual contents in the array
by value would create a copy but not change the original

26
Q

how can abstraction help with a programming project

A

reduces the complexity of the design
reduces the complexity of programming
removes irrelevant information

27
Q

how does a private attribute improve the integrity of the data

A

they can only be accessed by their methods
cannot be accessed accidentally