Download presentation
1
Prelim Revision Computing Science
2
Types of Errors Syntax Errors Logical Errors Run time errors Highlighted by the compiler. Error messages are given. This type of error is caused by the failure of the programmer to use the correct grammatical rules of the language. Examples Misspelling Missing inverted commas For without Next
3
Logical Errors These are the hardest errors to find as they do not halt the program. They arise from faulty thinking on behalf of the programmer. They can be very troublesome. These are mistakes in a program's logic. Area = Length + Breadth
4
Run-Time Errors Run-time errors are detected by the computer and displayed during execution of a program. They will halt the program when they occur but they often do not show up for some time. A run-time error occurs when the user directs the computer to perform an illegal operation, eg: Dividing a number by zero. Assigning a variable to the wrong type of variable. Using a variable in a program before assigning a value to it.
5
Passing Parameters The mechanism used to pass parameters to a procedure (subroutine) or function. Parameter A variable that must be given a specific value during execution of a program or of a procedure within a program. Parameters can be passed by reference and passed by value.
6
By Value By Reference Any changes to the variable made by the code in the subroutine or function will not be passed back to the main code. This is the default passing mechanism. Passes the reference to the variable and allows its value to be chnaged and passed back to the main code.
7
Actual and formal parameters
Actual Parameter Parameter that are used during a call. These parameters are passed into the sub-programs. Formal Parameters Parameters that are used in the sub-programs definition and declaration. Formal Actual
8
Standard Algorithms Algorithms are created to allow users to tell a computer how to solve a problem. Input Validation Find Max Find Min Count Occurrences Linear Search
9
Find Max – reading and understanding from a piece of code
Set highest to value(1) FOR index from 2 to 10 IF value(index) > highest THEN Highest = value(index) END IF END FOR
10
Count Occurrence – Write Code
11
Registers Registers are temporary storage locations located within the processor. Registers hold: Instructions currently being executed Memory addresses Data being processed
12
Function Functions usually take in data process it and return a result. A function is a sub program which can only return a single value. A function can be used multiple times within the same program. Parameters passed into a function are not (normally) returned.
13
Methods and Functions Method Is a subroutine within an object in OOP. It defines an objects behaviour. Methods do not have independent existence – that means they are defined inside the class. Methods belong to a class. Function Is not part of an object and functions independently in the program. Independent existence means that they are defined outside the class.
14
Bit Mapped Images A bitmap graphic is composed of many tiny parts, called pixels. Every pixel is stored and has a binary value. The colour within a pixel is normally represented by 3 bytes, one byte for each of the three primary colours of Red, Green and Blue. An 8 bit palette of colours will allow for 256 different colours.
15
Advantage of arrays Only one line of code required to create multiple values. Efficiency of code(readable code, less coding better for memory and processor) Parameter passing easily implemented with one line Individual elements can be referenced by indexing. This should be a reminder of N5 content Arrays can be of more than one simple dimension, but that is beyond the Higher course. In Visual Basic, Comal or TrueBASIC, all elements in an array must be of same type, but in modern languages such as JavaScript, PHP or Python, elements in arrays can be of mixed types.
16
HTML HyperText Markup Language, commonly referred to as HTML, is the standard markup language used to create web pages. HTML provides the layout and the structure of a webpage using different tags for each area.
17
CSS It is important to keep the structure separate from the formatting - layout. Web Developers use rules within a Cascading Style Sheets to achieve this. Why? Consistency By making one change to your website's CSS style sheet, you can automatically make it to every page of your website.
18
What is CSS? CSS stands for Cascading Style Sheet and is used by web pages to help keep information in the proper display format. Rules A rule or "rule set" is a statement that tells browsers how to render particular elements on an HTML page. A rule set consists of a selector followed by a declaration block.
19
Create a CSS rules using the information in the table above.
CSS Rules cont… Class Font Size Colour Style .heading Comic Sans 18 #FF0000 Bold Typical Question Create a CSS rules using the information in the table above. .heading { Font-family: Comic Sans; Font-size: 18 px; Color: #FF0000; Font-style:italic; }
20
Example CSS properties
Text-align Font-weight
21
A CSS rule-set consists of a selector and a declaration block:
The selector points to the HTML element you want to style. The declaration block contains one or more declarations separated by semicolons. Each declaration includes a CSS property name and a value, separated by a colon. A CSS declaration always ends with a semicolon, and declaration blocks are surrounded by curly braces.
22
Video Compression Techniques – Lossy Compression
Lossy compression is a technique that results in some of the detail being lost in the compressed file. The data removed is not noticed by the human eye and the sound is not noticed by the human ear. Reduces the file size by removing only changes between each frame. Keyframes are created and only the change between each frame will be deleted.
23
Database A computer games uses a relational database to store the 4 tables shown below. Typical Question Using the information from the above table create an entity relationship diagram. Customer Order Games Sales
24
Reports and Forms Customer ID 54312 Customer Name: Mia Austin Date Game Order No. Price 11/03/2015 Ravens Cry 28 £39.99 17/12/2015 Assassin’s Creed: Victory 123 £45.99 Typical Question Describe how the company would use the database software to produce this report.
25
Create a relationship between Customer, order and games
Create a query with the following fields: Customer.Customer ID Customer.Name Order.Date Game.Game Name Order.Order No. Game.Price Remember to check if any order has been applied ascending order or descending order
26
Forms – Usability A Form provides very easy way (user-friendly interface) to enter data into database, edit data, and display data from database. The non-technical users can also perform various operations on databases through Forms without going into the technical details of a database. Apply text boxes for users to easily enter new records. Use check boxes for yes/no boolean field types. Use combo/lookup tables to select from a list. – this saves the user having to type and less likely to make mistakes. Add delete, create or submit buttons.
27
Communication Act Law covers: Offence to obtain access to the internet when there is no intention to pay for it. Offence to send a message that is grossly offence or of an indecent, obscene or menacing character over a public electronic communication network. Facebook Twitter
28
Compound Key A compound key is a specific type of primary key which uses the contents of two fields to create a unique value.
29
Usability Testing Firstly – what is usability? The term usability describes how useable software is in relation to its intended purpose. A key feature of usability is the way that the human computer interface is designed. Secondly – what is Usability Testing? Is a technique used in to evaluate a product by testing it on typical users. Users would test the product within the environment (realistic situation)) intended. User(testers) would feedback results and may complete questionnaire or report before and after testing takes place.
30
Phishing Phishing is a form of fraud in which the attacker tries to learn personal information such as login details or bank account information by pretending to be a reputable business or person in . Example Receiving s from what looks like a trustworthy source such as the Royal Bank of Scotland. The requesting personal information such as password, usernames and bank details.
31
Open Source Free Software with its source code made available. User will receive a licence in which the copyright holder has the rights to: Study Change Distribute Why? Allows collaborative work in which programmers can improve the code and share the changes within an online community. No financial gain and allows for the elimination of bugs Highlights any security flaws within the software
32
Trace Table A testing technique used to test the program , in order to make sure that no logical errors occur whilst being processed. You must be able to create a table from an algorithm. A trace table might appear to look very similar to a test plan, but without the other headings like 'expected outcome' and 'actual outcome'
33
Breakpoint Is a feature of a software development environment that allows a program to be halted. (like a timeout) A signal tells the debugger to suspend the execution of the program at any chosen point. Execution can be resumed at any time from the breakpoint. Why? Assist with the finding of errors in a program. How it works Values of variables can be inspected to determine issues Ability to step-into and step over code to assess effects Program flow and logic can be inspected Sections of code can be checked – saving time
34
Virtual Machine Can be used for testing new operating systems. Why? Ability to run more than one operating system on the one computer system. Better security as its much easier to deal with one infected machine. Reduces administration and support costs within a network situation. Reduces hardware and office costs as supports remote access from outside an office.
35
Agile Methodologies Is an alternative to the software development process. Analysis Design Implementation Testing Documentation Evaluation Maintenance Software development process takes time and can be an iterative process.
36
Important Values Individual and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract and negotiation Responding to change over following a plan Regular adaptations of the program and when problems arise they are acted on. The program is delivered in parts as the project progresses and feedback is given by the client. Short design to build a working program to pass to the client. Ability to respond quickly to change. Used in the development of computer games.
37
Cloud Storage model in which is maintained, managed and backed up remotely and made available to users over a network. Types Public Cloud Private Cloud Hybrid Cloud – will discuss after prelim Public Private Owned and operated by a 3rd party provider. No hardware or maintenance charge for users. Ideal for small/medium businesses. Pay as you go approach. Bespoke structure purely dedicated to the business of the user. Hosted onsite or from a data structure. Provides greater level of control over security. Works well in large organisations.
38
Public Private Cost effective – no need for hardware(servers) or maintenance costs. Great reliability – If data center goes down there will be a backup center ready to kick in. Security Issues – Major issue of hacking. Security – high level of security Higher level of control over the server preferences and house styles. Cost – higher initial cost outlay Access – may be difficult to access data remotely. Due to high restrictions.
39
Encryption Two types of encryption: Symmetric encryption
Asymmetric encryption
40
This is the simplest and oldest form of encryption, as it uses a shared key and encryption algorithm. Both users have access to this ‘secret’ key and can therefore decrypt messages from one another.
41
Asymmetric Encryption
This is a more complex, yet secure, method of encryption. Both users have a pair of keys called a public key and a private key that are linked to one another. The public key is always used to encrypt the message. The private key is used to decrypt the message.
42
The sender uses the recipient’s public key to encrypt the message
The sender uses the recipient’s public key to encrypt the message. The recipient can then decrypt the message using their private key.
43
Comparison of Encryption Methods
Symmetric Asymmetric This is not as secure – as the secret key is transmitted over an insecure channel. However, it is a faster method of encryption. This is slower and more complicated. However, a lot more secure, as both parties do not need to share their own private key.
44
Digital Signature A digital signature is a method of ensuring authenticity of a message, document or piece of software. Users apply signatures to documents before sending across a network. User A will use their private key to sign the document. This involves encrypting it, using a hashing algorithm. User B will then decrypt the message using the sender’s public key made available to them.
45
A digital certificate contains the following information:
Public key Information about individual/organisation to whom the certificate was issued Information about issuer (Certificate Authority) Date issued Serial number
46
Digital Certificate – Why?
Allows for secure communication over the internet (data is not tampered with) Used to encrypt communication between two parties (as it contains public keys) Validated by a third party (Certificate Authority, e.g. VeriSign) to ensure users are trustworthy
47
Carbon Footprint The amount of carbon dioxide released into the atmosphere as a result of the activities of a particular individual, organisation, or community. Electricity Transport choice Diet – heavy meat eater Technology(How many gadgets you purchase)
48
Reduce Eat less red meat Buy organic Driving less – walking more
Purchasing less – second hand, recycle, repairing instead of replacing Plaint trees Invest in energy efficient products
49
Reduce - Technology Companies are being regulated to ensure that they have a reduced or neutral carbon footprint. This means they offset their energy usage in ways that will save energy. For example by: Installing equipment which reduces their emissions. Generating their own renewable energy, such as by using solar panels. Sponsoring alternative energy initiatives to reduce the carbon footprint in developing countries.
50
Lifetime carbon footprint
Throughout the life of an electronic device, it will have a lifetime carbon footprint. This comes from: Manufacturing - the materials and resources used to create and build the device during manufacture. Use/operation - electricity usage, any replacement parts etc, as the device is used in its everyday life. Disposal - more energy is used to collect, take apart and dispose of the electronic device.
51
Client Side/Server Side
The Server - This party is responsible for serving pages. The Client - This party requests pages from the Server, and displays them to the user. In most cases, the client is a web browser.
52
Basic Example The User opens his web browser (the Client). The User browses to The Client (on the behalf of the User), sends a request to for their home page. The Server then acknowledges the request, and replies the client with some meta-data (calledheaders), followed by the page's source. The Client then receives the page's source, and renders it into a human viewable website. The User seach into the search bar, and presses Enter The Client submits that data to the Server. The Server processes that data, and replies with a page matching the search results. The Client, once again, renders that page for the User to view.
53
Online Forms A website often requires user to enter data into a form which is then sent over the internet. Booking holidays Online Registration Purchasing goods
54
Server side scripting Server side scripts are used to ensure that the data that has been entered into the form is valid. For example, the server side script can give error messages if the data has not been entered correctly. Other examples, check credit card details or postcode verification.
55
Client/Sever Validation – Why?
Ideally, users will fill the web form with necessary information and finish their job successfully. However, people often make mistakes. Web form validation is to ensure that the user provided necessary and properly formatted information needed to successfully complete an operation. If the validation fails, the response is then sent back to the client, page that contains the web form is refreshed and a feedback is shown.
56
Why cont…. Each field within a form will need to be validated as users from the client side could enter malicious script which would be send over the internet to the sever. This could cause a cross site scripting attack. Research cross site scripting attacks What is it? What damage can it do?
57
Meta Data Metadata is data that describes other data. Metadata for web pages contain descriptions of the page’s contents, as well as keywords linked to the content.
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.