0% found this document useful (0 votes)
74 views

cie-igcse-computer-science-0478-practical-znotes

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views

cie-igcse-computer-science-0478-practical-znotes

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Downloaded by Success Groups

TABLE OF CONTENTS
2
CHAPTER 1

Algorithm Design & Problem Solving

3
CHAPTER 2

Programming

4 Databases
CHAPTER 3

Downloaded by Success Groups


CIE IGCSE COMPUTER SCIENCE//0478 Downloaded by Success Groups
• Functions are sub-routines that return a single value
1. ALGORITHM DESIGN & PROBLEM-SOLVING
• Trace Tables: A technique used to test algorithms, in
1.1 Problem-solving & Design order to make sure that no logical errors occur whilst the
• Every computer system is made up of sub-systems, algorithm is being processed.
which are in turn made up of further sub-systems.

• Top-down Design – The breaking down of a computer


system into sub-systems, then breaking each sub-system
into smaller sub-systems, until each one only performs a
single action. A structure diagram diagrammatically
represents top-down design. Example below.

• Test data – All the items of data required to work


through a solution. It is inputted into the program and
compared with the expected results. Examples are for a
school grade
o Normal – 28; 64; 98 - Accept
o Erroneous/Abnormal – eleven; -12; 158 - Reject
o Extreme – 0; 100 – Accept
o Boundary – 0; -1 – Accept; Reject

• Validation – Automated checking by a program that data


is reasonable before it is accepted as an input.
o Range – Accepts numbers within a specified range
o Length – Accepts data with an exact number of
characters OR has a reasonable amount of characters
o Type – Accepts data with a certain data type
o Character – Accepts data without invalid characters
o Format – Accepts data that conforms to a specified
1.2 Pseudocode & Flowcharts
patter/format
• Pseudocode - Verbal representation of an algorithm (a
o Presence – Requires data to be inputted
process or set of steps) and flowcharts are a
diagrammatic representation.
• Verification – Checking that data has been accurately
copied onto the computer or transferred from one part
of a computer system to another.
o Double entry – Data is entered twice and compared
o Visual/Screen – Manual check compared by the user

• Sub-rountine - Block of code that can be called and


accessed by a main program.

PAGE 2 OF 5
CIE IGCSE COMPUTER SCIENCE//0478 Downloaded by Success Groups

• Flowcharts o CASE…OF…OTHERWISE…ENDCASE – Multiple


conditions and corresponding consequences

CASE OF [VARIABLE]
OPTION: [CONSEQUENCE]
OTHERWISE: [CONSEQUENCE]
ENDCASE

CASE OF GRADE
GRADE>80: OUTPUT “A”
GRADE>70: OUTPUT “B”
GRADE>60: OUTPUT “C”
OTHERWISE: OUTPUT “FAIL”
ENDCASE

• Loop Structures:
o FOR…TO…NEXT- Will run for a determined/known
• Input & Output (READ & PRINT) – Used to receive and amount of times
display data to the user respectively
FOR [VARIABLE]  [VALUE] TO [VALUE]
OUTPUT “ENTER NAME” [CODE]
INPUT NAME NEXT
OUTPUT “HELLO”, NAME
(ALTERNATIVELY) o REPEAT… UNTIL – Will run at least once till condition is
PRINT “ENTER NAME” satisfied; Verification is done after running code
READ NAME
PRINT “HELLO”, NAME REPEAT
[CODE]
• Assignment - Each variable is assigned using a left arrow. UNTIL [CONDITION]

[VARIABLE]  [VALUE] o WHILE…DO…ENDWHILE – May not ever run;


GRADE  98 Verification is done before running code

WHILE [CONDITION] DO
• Conditional Statements: [CODE]
o IF…THEN…ELSE…ENDIF – 1 condition ENDWHILE

IF [CONDITION] THEN 2. PROGRAMMING


[CONSEQUENCE]
ELSE 2.1 Programming Concepts
[CONSEQUENCE] • Declaration & Usage of Variables & Constants
ENDIF o Variable – Store of data which changes during
execution of the program (due to user input)
IF GRADE > 100 THEN o Constant – Store of data that remains the same during
OUTPUT “INVALID”
the execution of the program
ELSE
OUTPUT “VALID”
ENDIF

PAGE 3 OF 5
CIE IGCSE COMPUTER SCIENCE//0478 Downloaded by Success Groups
• Basic Data Types 3.2 Primary Key
o Integer – Whole Number e.g. 2; 8; 100 • It is a field that uniquely identifies each record. E.g.
o Real – Decimal Number e.g. 7.00; 5.64 Student code will be the primary key in a school
o Char – Single Character e.g. a; Y database.
o String – Multiple Characters (Text) e.g. ZNotes; COOL
o Boolean – Only 2 Values e.g. True/False; Yes/No; 0/1

DECLARE [VAR/CONST] AS [DATA TYPE]


[VALUE]

• IMPORTANT CONCEPTS
o Sequence – Statements are executed in order. E.g.
Variables must first be declared, and then used. 3.3 Query-By-Example (QBE)
o Selection – Allows data items to be picked according to
given criteria. E.g. Finding the highest/smallest value
o Repetition – Causes statements to be repeated (loops)
o Totaling – Used with repetition, to keep the total
updated. E.g.
BillTotal  BillTotal + ProductCost
o Counting – Used with repetition to increment the
counter by 1, each time the loop is repeated. E.g.
NumItems  NumItems + 1

2.2 Data Structures; Arrays


• Declaration
DECLARE [NAME][1:n] AS [DATA TYPE] • Field: Field Name
• Table: Table Name
DECLARE GRADE [1:18] AS REAL • Sort: Ascending (A-Z) or Descending (Z-A)
• Use of FOR Loop to Read & Write • Show: Checked (Present) or Empty (Absent)
DECLARE GRADE [1:18] AS INTEGER
FOR I  1 To 18 • Criteria:
OUTPUT “GRADE OF STUDENT”, I
INPUT/OUTPUT GRADE [I] TEXT
NEXT Criteria
Written As Function
Name
3. DATABASES Like
Contains Values that contain x
(“*x*”)
3.1 Data types Does Not Not like Values that do not
Contain (“*x*”) contain x
• The data type names are different in Access:
o Real – Number Begins With Like (“x*”) Values beginning with x
o String – Text
o Boolean – Yes/No Ends With Like (“*x”) Values ending with x

Values that come before


Comes After >= “x”
x in alphabetical order

Comes Values that come after x


<= “x”
Before in alphabetical order

PAGE 4 OF 5
CIE IGCSE COMPUTER SCIENCE//0478 Downloaded by Success Groups

NUMBERS
Criteria Name Written As Function
Between Values in the range
Between
“x” and “y” between x and y
Less Than <x Values smaller than x
Less Than or Values smaller than or
<=x
Equal To equal to x
Greater Than >x Values larger than x
Greater Than Values larger than or equal
>=x
or Equal To to x

DATES
Criteria Name Written As Function
Between
“#mm/dd/yyyy#” Dates between the
Between
and specified dates
“#mm/dd/yyyy#”
Dates before a
Before < “#mm/dd/yyyy#”
certain date
Dates after a
After > “#mm/dd/yyyy#”
certain date
Records containing
Today =Date()
today’s date
Records containing
x Days Before
<=Date()-x dates x or more
Today
days in the past

PAGE 5 OF 5
Downloaded by Success Groups

You might also like