component 2 Flashcards

1
Q

why is abstraction needed

A

programmer to focus on the important aspects of
a problem
which enables teams of programmers to work on different aspects of a problem
and
enables programmers to use pre-built and built-in functions without
concerning themselves with how they work.

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

examples of abstraction : 6

A

variables
✚ objects
✚ layers
✚ data models
✚ data structures
✚ entity-relationship diagrams.

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

diffremec between abstraction an reality

A

abstraction is a simplification of reality it does not take into account external factors of a problem from the real world (time delays)
do not give an exact or definite overview of the actual events in the real world.

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

abstraction in UI

A

remove distracting things and include
useful icons - times, volume signal strength
e.g car gps (inserted of film outside area use what is listed above)
and important information for user

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

why is thinking ahead important

A

maximise code efficiency
minimise erros
identify futur consequences

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

what does thinking ahead involved

A

s planning inputs and outputs.

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

thinking ahead Identify the inputs and outputs for a given
situation

A

n. When the
functions of a program are described, they are essentially a description of
what outputs it will produce. These may be:
✚ on-screen information
✚ printed data
✚ data to be stored
✚ actions for the computer to complete.
, the source of those inputs and the order and
format in which they are supplied is an important consideration.
The designer must decide upon the data types and data structures required
for the proposed solution to the problem.

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

define precondition

A

the requirements that must be met before the program
can run.

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

preconditions can be specified within documentation a

A

✚ requirements for the device specification to be able to run the program
✚ the operating system required to run the program
✚ any necessary additional software or hardware.

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

preconditions When planning the development of a program or routine:

A

When planning the development of a program or routine:
✚ subprograms will need the correct data passed to them
✚ input data should be validated to ensure it meets essential criteria
✚ actions need to be validated to ensure they will not crash the program if
erroneous results are returned.

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

what is caching

A

the process of ​storing instructions or values in cache memory​ after they have been used, as they​ may be used again​.

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

how are reusable programs a benefit

A

Reusable components include​ implementations of abstract data structures​ such as queues and stacks as well as ​classes
hen designing a piece of software, the problem is ​decomposed​: it is ​broken down into smaller, simpler tasks​. This allows developers to identify where program components developed in the past​, or externally-sourced components​, can be ​reused ​to simplify the development process.

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

why is it better to use reusable program components

A

more reliable​ than newly-coded components, as they have already been tested​. This ​saves time, money and resources​.
Producing well-tested,reusable components means that they can be ​reused in future projects​,​ saving development costs​.

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

Disadvantage of use reusable programs

A

may not be compatible with the whole software so it may be a problem to integrate existing components This might mean these components need to be modified to work with existing software, which can sometimes be more costly and time-consuming than developing them in-house.

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

the process of thinking procedurally is Calle

A

decomposition

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

define decomposition

A

the process of breaking down large and complex problems into smaller sub- problems to make its more manageable and easier to solve

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

why is decomposition good

A

The project becomes ​easier to manage​ and can be ​divided between a team

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

designed used to show decomposition

A

top down hierarchy
1. the problem
2. main components
3. sub- problems for each main component

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

how ar steps ordered to solve a problem things to consider

A

When constructing the final solution, thinking about the ​order in which operations are performed​ is important.
● Programs may require certain inputs to be entered in a particular order by the user before processing can occur
Inputs need to be validated, and this must occur before this data is used.

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

what does thinking logically mean

A

understanding where decisions need to be made
and their consequences.

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

define paradigm

A

is used to specify an overall approach to writing program code.

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

conditions taht affect outcome of a decision

A
  • order of importance
    evaluation of conditions (is this option reasonable?it it conveieninent? etc)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

what is concurrent thinking

A

the process of completing ​more than one task​ at a given
time.

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

how are you able to think concurrently

A

involves giving ‘slices’ of your time to different tasks.
● Parts of a problem which are related can often be solved concurrently.

25
Q

what is occurrent processing

A

each task is given​ a slice​ of processor time to make it
appear as if tasks are being completed ​simultaneously​.

26
Q

what is parallel processing

A

when ​multiple processors​ are used to complete more than
one task simultaneously

27
Q

benefits of concurrent processing

A

The ​number of tasks completed in a given time​ is increased.
Less time is wasted waiting​ for an input or user interaction, as other tasks can be
completed in this time

28
Q

drawback of concurrent processing

A

● Concurrent processing can take longer to complete when large numbers of users or
tasks are involved as processes cannot be completed at once.
● There is an​ overhead in coordinating​ and switching between processes, which
reduces program throughput.
● Just as with parallel processing, not all tasks are suited to being broken up and
performed concurrently.

29
Q

types of constructs used tor represent control flow

A

Sequence:Code is executed ​line-by-line​, from top to bottom.
Branching:A certain block of code is run ​if a specific condition is met​, using IF statements. This is also known as ‘selection’.
Iteration: A block of code is executed a ​certain number of times​ or​ while a condition is met​.

30
Q

spudocode representating number range

A

for i = 1 to 10
print (i)
next i

31
Q

python representing number range

A

for i range (1,11)
print (i)

32
Q

. Iteration uses

A

FOR, WHILE or REPEAT UNTIL loops.
Iteration can be either:

33
Q

Iteration can be either:

A
  • Count-controlled
    for i in range (0,10):
    print i
    next i

Condition-controlled while i <= 20:
print “Not true”;
i=i+1
endwhile

34
Q

what is recursion

A

a programming constrict which a subroutine calls its self during its execution until a certain condition is met

35
Q

feature that make a problem solvable

A

1.Problem recognition:● Analysing strengths and weaknesses with the current solution
● Considering inputs, outputs, stored data and volume of data
2.Problem decomposition:​broken down into smaller problems​ until ​each subproblem can be represented as a self-contained subroutine to reduce the complexity​
3.Use of divide and conquer
4.use of abstraction :excessive details are removed ​to​ simplify a problem​.(pre-programmed modules and libraries to be used rather than coding from scratch.)
5.Problem solving strategies

36
Q

what is divide and conquer

A

Divide and conquer​ is a problem-solving technique that can be broken down into three parts: ​divide, conquer and merge​.
- Divide’ involves​ halving the size of the problem with every iteration​.
- Each subproblem is solved in the ‘Conquer’ stage, often ​recursively​.
The solutions to the subproblems are then ​recombined ​during the ‘Merge’ stage to form the final solution to the problem.

36
Q

what is divide and conquer

A

Divide and conquer​ is a problem-solving technique that can be broken down into three parts: ​divide, conquer and merge​.
- Divide’ involves​ halving the size of the problem with every iteration​.
- Each subproblem is solved in the ‘Conquer’ stage, often ​recursively​.
The solutions to the subproblems are then ​recombined ​during the ‘Merge’ stage to form the final solution to the problem.

37
Q

where is divide and conquer applied to

A

quick sort, merge sort and binary search

38
Q

advantages of using divide and conquer

A

the size of the problem is halved with each iteration which greatly​ simplifies very complex problems​.s the size of a problem grows, the time taken to solve it will not grow as significantly.

39
Q

Disadvantage of divid and conquer

A

makes use of recursion, it faces the same problems that all recursive functions face: ​stack overflow​ will cause the program to crash and large programs are very​ difficult to trace​.

40
Q

types of problem solving strategies

A

Backtracking
Data mining
Heuristics
Pipelining
Visualisation

41
Q

what is backtracking

A

roblem-solving technique implemented using ​algorithms​, often recursively​. It works by​ methodically visiting each path​ and​ building a solution based on the paths found to be correct​.

42
Q

what happens if a path is found invalid in back tracking

A

the algorithm ​backtracks to the previous stage
and visits an alternate path. ​Depth-first graph traversals
are an example of backtracking.

43
Q

example of backtracking

A

maze

44
Q

what is data mining

A

Data mining is a technique used to identify patterns or outliers in​ large sets of data collected from a variety of sources​, termed ​big data​.

45
Q

uses of data mining

A

data mining is used in software designed to ​spot trends or identify correlations​ between data which are​ not immediately obvious.

46
Q

benefits of data mining

A

Insights from data mining can be used to make ​predictions about the future based on previous trends​.
used to see habits and preferences based on their personal information.

47
Q

Disadvantages of data ming

A

dealt with in accordance with the present legislation regarding data protection as it involves the​ handling of personal data​,

48
Q

what are heuristics

A

A heuristic is a ​non-optimal, ‘rule-of-thumb’ approach to problem-solving​ which is used to find an ​approximate solution​ to a problem when the ​standard solution is unreasonably time-consuming or resource-intensive​ to find.

49
Q

what is the solution of heuristics

A

The solution found through using heuristics is ​not perfectly accurate or complete​.

50
Q

uses of heuristics

A

to provide an estimated solution for intractable problems​
A* algorithm, and are also used in machine learning and language recognition.

51
Q

what is performance modelling

A

Performance modelling​ eliminates the need for true performance testing by providing mathematical methods​ to ​test a variety of loads on different operating systems​.

52
Q

benefit of performance modelling

A

cheaper​, ​less time-consuming​ or ​safer ​method of testing applications.

53
Q

uses of performance modelling

A

It is useful for safety-critical computer systems, where it is not safe to do a real trial run

54
Q

what is pipeline

A

Pipelining​ is a process that allows for projects to be delivered faster, as modules are divided into individual tasks, with ​different tasks being developed in parallel​.
i.e the ​output of one process in pipelining becomes the input of another​, resembling a production line​.

55
Q

what is visualisation

A

Data can be​ presented in a way that is easier for us to understand ​using ​visualisation​ to produce graphs, trees, charts

56
Q

benefit of visualisation

A

makes it possible to ​identify trends that were not otherwise obvious​.

57
Q

uses of visualisation

A

Visualisation is another technique that is used by businesses to identify patterns which can be used to inform business decisions.