Show Menu
Cheatography

WJEC A2 Computing Unit 3.4->3.5 Cheat Sheet by

Progra­mming Paradigms

Imperative
Directly telling the computer what to do via a series of instru­ctins. Procedural and object­-or­iented progra­mming are both subsets of imperative progra­mming.
Declar­ative
This is where the programmer can "declare" what the solution should look like, and the language will obtain the results without the programmer explicitly telling it how. A common example of this is SQL.
Procedural
This is where a program is given a sequence of instru­ctions - a procedure - to solve a problem or perform a task. For example, C and Pascal are both procedural languages.
Logic
The language is given a set of facts and rules about what is happening, and the computer can then extrap­olate data. If the computer is told that B is the child of A, it would deduce that A is the father of B. An example is Prolog
Functional
This is a language that uses functions to obtain and calculate values. For instance, double(4) would return the value 8. Examples of this are C++ or Python.

Low Level Progra­mming

Low level code involves working very closely with the physical inner-­wor­kings of the computer, for example directly pushing to registers and the accumu­lator.
Low level languages are usually:
1. Difficult for progra­mmers to use since even simple tasks require a lot of code.
2. Used to develop perfor­man­ce-­int­ensive programs or tasks.
3. Very small in terms of file size
4. Usually hard-coded onto ROM chips for small jobs

Types of Changeover

Direct Changeover
The old system is taken away and the new system is implem­ented completely overnight. This is risky, since if the new program has errors it could be catast­rophic.
Parallel Running
The old system is run alongside the new system for a while. This involves duplic­ating all the work done on both systems, but if there are errors in the new system then things are not as catast­rophic.
Piloting
The new system can be tested out by one branch of the company at a time so that if anything fails, the entire company is not in trouble.
Phased Changeover
Part of the new system is used, then once all the problems have been worked out then another part can be used.

Types of Docume­ntation

Technical Manual
This would include technical details for use by a progra­mmer. For example it might involve data flow diagrams, flowcharts, variable lists or data dictio­naries.
User Manual
This is written for use by the end user. This might involve instru­ctions for starting and installing the program, clerical proced­ures, how to use the program, or fixes for common errors.
 

Object­-Or­iented Progra­mming

What is it?
Object­-Or­iented languages are languages which deal with "­obj­ect­s". Objects usually have a set of attributes and methods which are specific to that type. Objects are usually instances of Classes.
What's a class?
A class is a "­tem­pla­te" for an object to be generated from. This would outline the member variab­les(or attributes) and methods for use later in the program.
What's inheri­tance?
A class can inherit from another class. This is commonly used for creating a very broad defini­tio­n(e.g, Animal) and then extending it for more specific functi­ona­lit­y(e.g Dog). A class which inherits from another class will have all the attributes and methods of the class it inherits from.

High Level Languages

High level languages are languages which create a great deal of abstra­ction between the programmer and the CPU itself. Examples of this are C, Java and Python.
High level languages are usually:
1. Easier for humans to understand
2. Proble­m-o­riented
3. Used to develop programs which can run on different processors

System Life Cycle

1. Problem Definition
State the aims and objectives for the program.
2. Feasib­ility Study
Determine whether the project is econom­ica­lly­/te­chn­ically viable. This might involve legality, time expense, monetary expense or techno­logical complexity.
3. Invest­igation
Carry out questi­onn­aires, interviews, observ­ations and study existing documents to determine some of the requir­ements for the program.
4. Design
Create a detailed design for the new system, involving database modelling, screen designs and map out what processes will need to be carries out on the data.
5. Develo­pment
The program is actually created. Alongside this, the program will be tested via either alpha, beta or acceptance testing. Alpha testing is performed by people employed by the company who have not worked on the project. Beta testing involves giving the program to people outside the company for testing. Acceptance testing involves giving the program to the client for feedback.
6. Implem­ent­ati­on/­Cha­ngeover
Changing from the old system to the new system. There are many different approaches to this, such as parallel running, phased changeover, etc.
7. Mainte­nan­ce/­Review
The system is maintained via either adaptive, corrective or perfective mainte­nance.
 

Types of Languages

Event Driven Languages
These are languages which can wait for an event to occur, such as a key press. When an event occurs it is handled by an event handler.
Markup Languages
These are a set of instru­ctions to denote how an item should look, or how data is to be organized. Examples of this include HTML and XML.
Visual Languages
A visual language uses graphical repres­ent­ations of code in order to make it more intuitive for inexpe­rienced progra­mmers. An example of this is Scratch

Polymo­rphism

Polymo­rphism is when a single operat­or(for example, +) has multiple meanings depending on data type. + could mean either integer addition or string contat­ena­tion, based on the context its used.

Encaps­ulation

Encaps­ulation involves the usage of "getters" and "setters" in order to prevent things from changing without conseq­uences.
For example, if the weight of a plane was updated, the fuel per hour would also need to be updated. This would be calculated and set approp­riately via a setter.

Syntax Diagrams

Backus Naur Form

BNF is a standard for writing the rules of syntax in a language.
BNF uses three symbols to define syntax:
::=
"is defined by"
|
"­OR"
< >
Define a variable
An example of this is the following:
1.
<di­git> ::= 0|1|2|...|9

2.
<in­teg­er> ::= <di­git> | <di­git> <in­teg­er>

Types of Mainte­nance

Perfective
This involves improving the system to run faster or perform better for its intended objective.
Adaptive
If there are changes in the company structure, requir­ements, etc then the system may need to be adapted to fit the new specif­ica­tion.
Corrective
This involves correcting problems or bugs in the program that were not noticed or fixed during testing.

Waterfall Approach

See above, also the waterfall approach is gay

Agile Approach

The Agile Approach is designed to be a more flexible altern­ative to the Waterfall Approach. Agile involves working closely with the client. Unfort­una­tely, Agile usually yields less detailed docume­ntation and less specific deadlines than the Waterfall Approach. There are two well known implem­ent­ations of the Agile Approach.
Extreme Progra­mming
This emphasizes four areas of the Agile approach which are commun­ication, simplicity, feedback and courage. The developers are frequently given opport­unities for regular feedback from other developers and the client. Also, they often program in pairs known as pair progra­mming.
Scrum
Scrum focuses on regular iterations to create prototypes quickly. Scrum usually involves having iterations called "sprints", where at the end of each sprint the team will reconvene and update each other on the progress that has been made.
                           
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          More Cheat Sheets by Horatio