0% found this document useful (0 votes)
17 views1 page

Comp Sci Notes

Uploaded by

eashangor.eg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Comp Sci Notes

Uploaded by

eashangor.eg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Abstraction- process of separating ideas from particular instances.

Means hiding detail and only using relevant detail it's a representation reality, using symbols to show real-life features or irrelevant
features left out. Examples: Road symbols so users can practise obeying these when driving, road number symbol, colour codings. Software is modular. Reusable components is modular,, example is an
object. Modules can be transplanted into new software. Or shared at run time, through the use of program libaries. Zebra crossing so user can practise slowing down. PEdestrian so user can practice
looking out for and avoiding pedestrians. Increase chance of creating program successfully, reduce programming time and factors that can detract from the program. Environment not shown,
33
movements reduced, time may not be represented as minutes, seconds. Reduces complexity of programming, requires less computational power so the game can be played on lower spec devices like
phonesm focus on the core aspects of the program rather than extras, too much abstraction can detract from the appeal of the game, may be too simplistic, to engage users. Virtual V Rueal, remove of
feature like stations, or might not be to scale, so distances may not be true. Think Ahead- Target temp- integer, wheel movement- boolean, engine running- boolean, internal temp- integer, external temp-
Abstraction- process of separating ideas from particular instances. Means hiding detail and only using relevant detail it's a representation reality, using symbols to show real-life features or irrelevant features left out.
internal.
Examples: Road symbols so users can practise obeying these when driving, road number symbol, colour codings. Software is modular. Reusable components is modular,, example is an object. Modules can be transplanted into
new software. Or shared
Itemsatofrun time,
data- throughData,
Popularity the use ...........................................................................................................................................
of program
Platforms libaries.
available, Zebracharged,
Prices crossingDoes
so user canalready?
it exist practise Number
slowing down. PEdestrian
of something, so user
Speed, can practice
Altitudes, Rate Oflooking out for and avoiding pedestrians. Increase chance of
Acceleration.
creating program successfully, reduce programming time and factors that can detract from the program. Environment not shown, movements reduced, time may not be represented as minutes, seconds. Reduces
complexity of programming, requires less computational power so the game can be played on lower spec devices like phonesm focus on the core aspects of the
Questionaire-Set of Questions given out to potential users to fill in and return. Interview- face to face discussions where potential users are asked questions, program rather than extras, tooWhere
Obeservation- much abstraction
users of thecan detract
existing
from the appeal of the game,aremay be too simplistic, to engage users.
thatVirtual V Rueal, remove
storedof
infeature
cache inlike stations, or might
again,not be to scale,access
so distances mayuse.
not Example
be true. Think
'StoreAhead- Target temp- integer, wheelinmovement-
system
boolean, engine running-
observed
boolean,startGame-load
simulation'. internal temp- integer, ...........................................................................................................................................
using it. Caching-Data
external temp-
game displaying
has been
internal.
the load-up
used is case it is need allows faster for future patients details'
screen, displayMap- outputs the map onto the screen. selectArea- user clicks on the area of the map and this is displayed on screen.
'Design of people

Decomposition- breaking down a complex problem or system into smaller parts that can be represented as a self contained subroutine. Makes project easier to manage, as different software
Items of data- Popularity Data, Platforms available, Prices charged, Does
development teams can be assigned to separate sections of theit exist already? Number ofto
code according something, Speed, Altitudes, Rate Of Acceleration.
their specialisms.

Questionaire-Set ofBarcode
Questions ofgiven
item purchased
...........................................................................................................................................
out to potential readusers to fill in and
at checkout, return.
barcode Interview-
compared with face to facestored
barcodes discussions wherenumber
on stockfile, potential ofusers
something are asked questions, Obeservation-
is decremented, new value compared Where users with the of thefield existing
containg system are observed
the minimum
using it. Caching-Data numberthat has beenare
of thing used is stored
allowed. in cacheof
If number insomething
case it is need again,
is less than allows
minimum faster access
stock andfor futureisuse.
no order Examplefor
outstanding 'Store
thispatients
item. details' 'Design of people in simulation'. startGame-load game displaying the
load-up screen, displayMap- outputs the map onto the screen. selectArea- user clicks on the area of the map and this is displayed on screen. Decomposition- breaking down a complex problem or system into smaller parts
that can be represented as a selfmay
No function contained
be longer ...........................................................................................................................................
subroutine.
than a single Makes page project
of code: easier
this tois tomanage,
reduceas different software
complexity development
and aid readability. teams
Variable can be assigned
identifiers must conform to separate sections
to a standard of the codethis
convention: according
helps other to their specialisms.
to understand the code
and reduces the likelihood of duplication, makes maintenance easier.
Barcode of item purchased read at checkout, barcode compared with barcodes stored on stockfile, number of something is decremented, new value compared with the field containg the minimum number of thing are allowed.
If number of something is less than
Concurrent minimumOne
Processing- stock and nodoes
process ordernot is outstanding
have to finish for this item.
before the other starts- example plane can move independently, all move at the same time, each element needs to be run simultaneuously,
wind, rain direction of air. ...........................................................................................................................................
No function may be longer than a single page of code: this is to reduce complexity and aid readability. Variable identifiers must conform to a standard convention: this helps other to understand the code and reduces the
likelihood of duplication, makes maintenance
Processes are happeningeasier. at the same time, one 1 process can happen at a time on a single core processor, concurrent tries to simulate multiple processes. Multiple orders can be made and added to the
...........................................................................................................................................
list at the same time, programming will need to allow multiple threads to manipulate a single list.
Concurrent Processing- One process does not have to finish before the other starts- example plane can move independently, all move at the same time, each element needs to be run simultaneuously, wind, rain direction of air.
WIll allow for multiple orders at the same time as it would happen in real life. Access to the linked list will need to be limited so it cant be accessed. Not all of the process will be paralleliseable. X
Processes are happeningprocessors at thedoesnt
same time,meant one it 1
willprocess can happen
run in 1/xth at a time
of the time of one onprocessor.
a single core processor, concurrent tries to simulate multiple processes. Multiple orders can be made and added to the list at the same time,
...........................................................................................................................................
programming will need to allow multiple threads to manipulate a single list.
Local Variables-Defined within 1 module, accessible only in that module, can be used as parameters, data is lost at the end of the module. 2 features of global variables that distinguish them from local-
WIll allow for multiple ordersat
Defined atstart
the same time asexist
of program, it would happen program.
throughout in real life. Variable
Access is tothe thename/identifier
linked list will need of ato be limited
memory so it cant
location used betoaccessed.
store data.Not all ofmeans
Scope the process a range willofbe paralleliseable.
statements that a Xvariable
processors doesnt
is valid for. Itmeant
takesit will
run in 1/xth of the time of one processor.
precedence over a glboal variable of the same name allowed to be used for diff purposes without conflict. Global are defined at start of program, can be seen everywhere in program. Local only be seen in

Local Variables-Defined within 1 module, will


...........................................................................................................................................
a procedure they are declared in. Local cease to exist once the procedure is finished. Local Variables with the same name as global will overwrite the values in the global variable. Local variable within 2
accessible only inwiththatone module, canAdvantage
be used as parameters,
different procedures not interfere another. of writing an data is lost at
application the aend
using of the approach-
modular module. 2 features of global
Work is easier variables
to divide between that distinguish
a team each them team from memberlocal- Defined
just needs at start
to know of
program, exist throughout
what values program. Variable
go into is the name/identifier
their subroutine and the expected of a memory location
functionality used to
Saves timestoreas workdata. takes
Scopeplace means a rangeeach
in parallel of statements
team member that can
a variable
work on is valid
theirfor. areaItof takes precedence over
expertise.Breaks a glboalinto
problems variable
smaller of the same
name allowed to be used for diff purposes without conflict. Global are defined at start of program, can be seen everywhere in program. Local only be seen in a procedure they are declared in. Local cease to exist once the
...........................................................................................................................................
areas.Easier to test/ debug/ read each subroutine can be tested before integration.Code can be reused in the project/future projects. Features Of IDE-Auto-complete
procedure is finished. Local Variables with the same name as global will overwrite the values in the global variable. Local variable within 2 different procedures will not interfere with one another. Advantage of writing an
application using a modular
Can view approach-
identifiers Work is easier
/ avoid spelling to divide
mistakes. betweenColour a team
coding each
textteam/ syntax member just needs
highlighting. Canto know what
identify features valuesquicklygo into / usetheir subroutine
to check codeand the expected
is correct. Stepping- functionality
Run one line Saves at atime timeas and work
check takes place in
result.
parallel each team member
Breakpoints- can work Stop onthetheir
codearea atof expertise.Breaks
a set point to check value problems into smaller
of variable(s) areas.Easier
Variable watch /to test/ window
watch debug/ read Check each subroutine
values can beand
of variables tested
howbefore they changeintegration.Code can be reused
during the execution Errorindiagnostics-
the project/future Locate
projects. Features Of IDE-Auto-complete
...........................................................................................................................................
and report errors / give detail on errors. Procedure is when a algorithm doesn't return a value whilst a function has to. Parameter By value- is a local copy of the data used and data is discarded when the
subprogram exits, doesnt override the og data. Parameter by Reference- Memory location of data is sent, and changes are made to the original data, changes are made to the og data, changes remain
Can view identifiersafter/ avoid thespelling
subprogram mistakes. exits. Colour coding text
Parameters / syntax
to global highlighting.
variables in recursive Can identify
functions- features
Parameterquicklyallows / use to check
value to be codesent is to
correct. Stepping-global
a sub program, Run one line atcan
variables a time and checkthroughout
be accessed result. Breakpoints-
the scope Stop of thethe code
at a set point to check value ofLocal
program. variable(s)
variables Variable
can only watch / watch window
be accessed within the Checkscope values
of the ofsub-program
variables andit's how they change
defined within ;Vduringparameterthe execution
becomes Error diagnostics-
a local variable inLocate the function. and report errors
IF global / give detail
equivalent of byonreference
errors. Procedure
-value is
when a algorithm doesn't
Memory location of the
return a value whilst ...........................................................................................................................................
a function has to. Parameter By value- is a local copy of the data used and data is discarded
would be over-ridden. Global variable takes more memory than a local variable/parameter. In recursion, each call produces a new local variable for num 1. GLobal would require altering the algorithm as
datavalueis sent, and changes are made to the original data, changes are made to the og data, changes remain after the
when
subprogram
the subprogram
exits. Parameters
exits,
to
doesnt
global
override
variables
the
in
og data.
recursive
Parameter
functions-
by Reference-
Parameter
would be over-ridden each call. Global would mean that memory space is kept throughout the running of the program, not just the sub-program. Many more memory spaces needed for
allows value to be sent to a subin
parameter program,
recursion, global
1 forvariables
each call.can be accessed
Features of iDE throughout
that help programmersthe scope offind thebugs-program. Local variables
Debugging tools allow caninspection
only be accessed of variables within thethis
value, scope canofallow the sub-program
run-time dection it's defined
of errors. withinCode ;V can
parameter
be
becomes a local variable
examined in theas function. IF global
it is running which equivalent
allows logicalof by reference
errors to be -value would be
pinpointed. IDEover-ridden.
debugging can Global variable
produce takes
crash dumb more memory
which shows than a local
state variable/parameter.
of variables at the point where In recursion,
an error each call produces
occurs. It can display a newstacklocal variable
for num 1. GLobal would altering the ...........................................................................................................................................
contents which show the sequencing through procedure. It can step through code which allows the programmer to watch the effects each line of code. The insertion of a break-point allows the more
require algorithm as the value would be over-ridden each call. Global would mean that memory space is kept throughout the running of the program, not just the sub-program. Many
memory spaces needed program to be stopped at a predetermined point in order to inspect its state. IDE- a single program used for developing program made from a number of components. Function- a named section of can be
for parameter in recursion, 1 for each call. Features of iDE that help programmers find bugs- Debugging tools allow inspection of variables value, this can allow run-time dection of errors. Code
examined as it is running
program which thatallows logical
performs errors totask,
a specific be pinpointed.
returns a vaule IDE debugging
often called can produce
inline. crash dumb
Breakpoints- Use which
to testshows state ofworks
the program variables up toat specific
the pointpoints,
wherecheck an error occurs.
variable It can display
contents at specific stack contents
points, can set which show the
a point
...........................................................................................................................................
sequencing throughwhere procedure. It can step
the program stops through
running. code which allows
Stepping- Can set thetheprogrammer
program totorun watchline by the effects
line, slow downeach line of code.find
execution, Thethe insertion
point where of a break-point
an error occurs. allowsPush- the program Check iftostack be stopped
is full, ifatnot a predetermined
then insert item, point
if it in
is order
to inspect its state. IDE- a single program used for developing program made from a number of components. Function- a named section of program
then return erorr that stack is full. Pop- Check if stack is empty, if it is then return error that stack is empty, if not then return item. 1D array can be set up and used to push and pop items as a stack , by that performs a specific task, returns a vaule often called inline.
Breakpoints- Use toarrraytest the program works up to specific points, check variable contents at specific points, can set a point where the program
size defined, a stack pointer is used to point to the top of the stack, when an item is pushed the stack pointer is incremented when an item is popped the stack pointer is decremented. Queue- A stops running. Stepping- Can set the program to run line by line, slow down
execution, find the point
datawhere an error
structure, FIFOoccurs.
(First inPush-first out),Check if stack
Private is full, if
attribute not thenintegrity
improves insert item, if it is then are
by properties return erorr that stack
encapsulated and can is full.
onlyPop- Check if stack
be accessed through is empty, if it is then
their methods, returnvalidation
enforce error that through stack isthe empty,methodif notandthen
return item. 1D arrayinappropriate
item is popped the stack
can be set up
pointer is
andcan
data used
decremented.
...........................................................................................................................................
beto push and
caught
Queue-
beforepopentered,
A
items ascant
data
a stack
structure, FIFO
, by arrrayTo
be changed.
(First in
size
first
ensuredefined,
out),
items
Private
a stack
and queuepointer
attribute
isexist
still usedand
improves
to point to thethe
are used
integrity
when the program closes, and load the items and queue from the file when it starts. FIFO- questions retrieved in the order they're stored. Questions can be added to the end, dynamic structure and by
topnext
of the
properties
timestack,
are
when anis
the program
encapsulated
itemrunis
and
ispushed
can
by storing
only be
thethestack
accessed
items pointer is incremented
and queue
through their
to an external
methods,
whenfile an
enforce
validation through the expands to take more questions. Linear search can be used if the array isnt sorted and cause linear doesnt need ordered and binary needs sorted array. Binary needs item in order. To perform a linear an
method and inappropriate data can be caught before entered, cant be changed. To ensure items and queue still exist and are used the next time the program is run is by storing the items and queue to
external file when the program
search, closes,
start at theandfirstload the items
element until and
value queue from
is found, orthe
endfile ofwhen
list reachedit starts. andFIFO-
not found.questions retrieved in
1 precondition the order
thats needed they're stored.search
b4 a binary Questionsis its can databe needsadded toto bethe end, in
sorted dynamic
alphabetical structure
order.and expands
Bubble sortto is take
more questions. Linear search can
an inefficient
is found, or end of listOne
reached
be used if
algorithm, ...........................................................................................................................................
the array
meaning isnttake
it will sorted moreandtimecause linearthe
to sort doesnt need ordered
list. Generally and binarybyneeds
outperformed sorted
insertion sort.array.
ItemBinary needs item
to be sorted in order.
is at the end of To theperform
list which a linear
is thesearch,
worststart caseat the firstfor
scenario element
bubbleuntil sort.value
thing that minimise the disadvantage of buble sort is if thers a small num of data items. Insertion sort happens one item a time (serially), moved into correct position untill all items in list are checked. list.
and not found. 1 precondition thats needed b4 a binary search is its data needs to be sorted in alphabetical order. Bubble sort is an inefficient algorithm, meaning it will take more time to sort the
Generally outperformed Slicing- by insertion
Extracting sort. Itemparts
certain to beof sorted
a string.is atTemp
the end of the list
Variables whichis
purpose is sothethatworst data case scenario
doesnt get lost.for bubble
Features sort. One thing
of linear search thatuses
minimise
a loopthe disadvantage
to check the first of bubleinsort
values a listisand
if thers a smallby
increment num of data
1, check items.
each
Insertion sort happens one foritem a timeto(serially), moved into correct position
showuntillthe all itemstask in listofare checked. Slicing- Extracting certain parts of acan
string. Temp Variables
updatedpurpose withoutisaffecting
so that data doesnt getprogram.
lost. Features of
value
linear search uses aComments
loop to check
a match
aretheuseful ...........................................................................................................................................
the target.
first values
for explaining
Structure
in a listwhat
diagrams
and increment by 1, check
the key features
smaller
each value
of a program do.for
a larger program,
a match to Separates
Indentation-
coding
the target. different
is easier, easier
Structurestatements
to test,
diagrams show
be fixed
the smaller
in a program.
and
Allows taskotherof a larger program, to
programmers coding
the rest
see the is easier,
of the
flow of easier to test, can
the program more be
fixed and updated without
clearlyaffecting
and pick out thedifferent
rest of the program.
features. Sub Comments
Programs- are usefulitfor
makes easierexplaining
for other what the key features
progammers to seeof howa program
differentdo. partsIndentation-
of a program Separates
work which different can statements
help them understandin a program. the Allows other programmers
overall program faster.
to see the flow of the program more clearly and pick out different features. Sub Programs- makes it easier for other progammers to see
Defensive design- its a method of designing a program so that it functions properly and doesn't crash, the codes well maintained, reduces the number of errors in the code through testing, anticipate how how different parts of a program work which can help them understand the overall
program faster. Defensive
user might
might misuse their program.
presenceInput
design-misuse
check-
its atheir
method
validation- ...........................................................................................................................................
program.
checks ifadata
of designing
programming
has actually
a programaso
Input validation-
process
that it functions
programming
that verifies
been entered, format
process
datacheck-
properly
is validcheck
thatand
b4 using
doesn't
verifies datacrash,
it. Types
if data
is validthe
of input
is in correct
b4codes
usingwell
valid check
format, look-up
maintained,
it. Types
is-table-
of inputreduces
rangechecks
valid check
check-data check
the number
is- rangeofcheck-
data isawithin
against
errors check
table ofa acceptable
in the code
specified range,
data through
is withintesting,
values, presence
a specified anticipate
check-checks
length check,
range, how user
checksififdata dataishas
actually been entered, format check- check if data is in correct format, look-up table- checks data against a table of acceptable values,
correct length. Authetntication-Process for checkin identity of the user. Increase security, strong passwo, limit num of fail authent attempts, b4 access to an acc is lost, ask for random select length check, checks if data is correct length. Authetntication-Process for checkin
of
identity of the user. Increase security, strong passwo, limit num of fail authent attempts, b4 access to an acc is lost, ask for random
characters from password on each authentication. Syntax errors when compiler or interpreter doesnt understand something you've typed because it doesnt follow the rules or grammar of the select of characters from password on each authentication. Syntax errors when compiler or
interpreter doesnt understand
programming
need to translate it. Low-level
something
language.
a program
...........................................................................................................................................
you've typed because
High-Level-
language
programitlanguage
thats designed
doesnt follow
toassembly
be easy for
designed the rules
to beor
a comp to
easygrammar
excute
for humans of theto programming
read and write language.
but comp High-Level- programit.language
need to translate Low-level designed
a program to be easy forthats
language humans designedto read toand writefor
be easy but a comp
comp to excute but trick for humans also called language. + One . but trick for humans also called assembly language. + One .

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................
instruction of high level code represent many instr of machin code, same code will work for many diff machine y processors, programmer can easily store data in lots of diff structure without knowing about the
...........................................................................................................................................
memory structure, code is easy to read and understand and modify, must be translated b4 computer is able to understand, program will be less mem efficient and slower. Low Level factor- 1 instruction of
assembly code usually only represents 1 instruction of\ machine code, usually written for 1 type of machine or processor. Programmer needs to know about internal structure of cpu and how it manage
memory, code is difficult to read understand and modify, program are more memory effeient and faster. Procedural programming language- A high level language gives a series of instructions in a logical order.
...........................................................................................................................................
Variable can be used by delcaring that variable as a local variable in each procedure. Accessible within one proceudre at a time.

Parameter Passing- parameter passed by value or by reference. By value, local copy of data is used then discarded, so value of og data is used then discarded, so value of og data is unchanged, by reference,
location of data is used so changes may be made to value of data.
...................................................................................................................................... [9]

END OF QUESTION PAPER

© OCR 2022

You might also like