Sie sind auf Seite 1von 9

FONTS

Two major fonts:

Serif - It is said that serif fonts are usually easier to read in larger text areas like in books,
magazines, in body content on websites.

Sans serif - Sans serif fonts are used regularly because of how clean they tend to look in
those main text areas.

CLI vs GUI:

GUI (Graphic User Interface) requires more resources from the computer such as icon and
fonts, thus having longer loading times. CLI (Command Line Interface) requires a lot less
resources and thus has shorter loading times. It can be more specific and it’s more intuitive.

HEX

Converting hex to binary:

e.g.

11010101

A 5

 13*16 + 5 = 213

COMPUTER

Two major components: MEMORY

 Hardware FILESYSTEM

 Software CPU Cycles


DRIVERS
Dup:
HARDWARE
 Data INTERNET PORTS
 Processes

Operating system allocates system resources to programs which are used to make
processes. These processes load a user interface so users can interact with the
program.
5 APPROACHES TO SOFTWARE
 Rapid Action Development - Take existing software to make their own
 Structured - Massive project in which there is explicit formal stages in the project.
e.g. rebuilding medicare.
 Agile - Planned timetables to output tasks, e.g. 30 days to do certain tasks
 Prototype - First minimal base to put something out to release, not complete
 End User – When developer makes it for themselves to use

Stub is a placeholder for subroutines (a piece of code used to stand in for some other
programming functionality) e.g. subroutine gets some data from the user called Get User
Input, read(variable) and return(variable) RETRIEVES THIS DATA AND SEND IT
BACK TO THE PROGRAM.

Check Program is being executed:

 Debug e.g. print(“Hello, world!”)


 Create Boolean Flag

Making code better:

 Modularity
 Being generic

This is done so it can be reused, be applicable in diverse situations.

Making code bad:

 Linkage
 Specificity
 Having numbers hard-coded in

Bad code can hardly be reused, making it very strict and limiting for other uses.

ASCII
A = 65 a = 97

(32) gap

REPRESENTATION OF CHARACTERS (each one is 8 bit).


SOFTWARE
Open source – People who use open source must also release the source code and
release the program in a non-commercial basis, however you must acknowledge the original
author.

Shareware – Has some limitations e.g. distributed on a free trial basis with the
understanding the user may need to pay later or releasing a free limiting version, needing to
pay for the full version if wanted. e.g. after 30 days, user cannot use the program.

Freeware - Freeware is software that is available for use at no monetary cost. It can be used
without payment but modification, re-distribution or reverse-engineering without the author's
permission is prohibited.

Nothing can extinguish copyright. Even if it is signed that you are entitled to your copyright
you cannot remove it.

STRUCTURE OF SHOWING HOW THE CODE WORKS


FETCH

DECODE

EXECUTE

IF PROJECT GOES BAD..?


GANTT CHART

 Showing critical milestones and tasks


 Progression through advancement

HIRE MORE PROGRAMMERS

 Expensive
 Might make production slower as they need to catch up to speed

MODULES
A module is a single file of code. Changing this module should not affect other files. Modules
are a group of sub-routines. Should not be affected by exterior routines.
5 STEPS IN PROGRAMMING
1. Define and understand
2. Planning
3. Implement
4. Test
5. Maintain

COMPILING VS INTERPRETING
Compiling – Produces an executable in which the code can be run.

Interpreting – One line at a time.

DATA TYPES
DATA TYPE DESCRIPTION

Integer The Integer data type represents integral


values, that is, whole numbers.
Character The Character data type represents a
letter. It is a symbol within ASCII.
Floating-point The Floating-point data type stores
floating-point values, that is, values that
have potential decimal places. It is
expensive to use and is inaccurate as it
the value can be rounded.
String The String data type represents
alphanumeric data, meaning it can
contain many different characters, but
they are all considered text even if it is
numbers.
Boolean The Boolean data type can only
represent two values: true or false.
Typically, 1 is used to represent True,
and 0 is used to represent False.
Programming uses a number of different data types. A data type determines what type of
values an object can have and what operations can be performed. Different type systems
ensures varying degrees of type safety, accurateness and efficiency of a program when
written by the programmer.

DATA STRUCTURES
DATA STRUCTURE DESCRIPTION

Array An Array is a data structure used to


store multiple data items where each
data item is of the same data type.
Records A data structure containing data items
that are related but not necessarily of
the same data type is called a Record.

CONTROL STRUCTURES
Control structures is a block of programming that analyses variables and determines the
direction in which statements within an algorithm are executed. It directs the flow control of a
program.
 Sequence – Is the control structure that ensures each process occurs in the right order.
 Selection – Is the control structure that allows decisions to be made between different
alternative paths. These are executed in response to the outcome of a condition. There
are two types of selection:
o Binary Selection – There are two alternatives, one being selected if the
condition is true and the other if the condition is false. This is a Boolean value.
o Multiway Selection – Caters for situations when more than two alternative paths
are required. The first choice encountered that makes the expression true causes
control to branch to that respective path. Multiway selection can be made using
multiple binary selection statements.
 Iteration – Is the repetition of a sequence of steps. A termination condition is used either
at the start or at the end of a sequence. It is often called ‘looping’, as control passes from
the last statement in the sequence back to the first statement. There are two types of
iteration:
o Pre-test Iteration – The termination condition comes before the body of loop. It
is possible that the processes within the loop will not be executed at all.
Repetition continues whilst condition remains true. It is when the condition
becomes false that the repetition terminates and proceeds with the code.
o Post-test Iteration – The termination condition follows the body of loop.
Processes within the loop will be executed at least once. The body of the loop
gets input from the user and the termination checks if the input is reasonable. If it
is not, further input is requested. If the input is valid then the loop is terminated.

ERRORS AND EXPECTIONS


 Logic – Occurs when the program doesn’t have right logic behind it, not terminating
abnormally but producing the wrong output.
 Syntactic – Not using the right grammar/spelling e.g. variable names. All syntactic errors
occur at compile time.
 Runtime errors – An infinite loop, reference missing files, crashes. Falls over, doesn’t
produce output.

RESERVED WORDS
EXAMPLES
WHILE condition
-
ENDWHILE
FOR x = condition do
-
NEXT x
CASEHWERE x
< 5: _
> 5: _
Otherwise: _
ENDCASE
IF condition
THEN _
ENDIF
REPEAT
-
UNTIL condition
LEXICAL ANALYSIS
Lexical analysis is the process in which a sequence of characters is converted into a
sequence of tokens.

SYNTACTIC ANALYSIS
Syntactic analysis is the process in which it takes in a sequence of tokens and puts in a
parse tree where it shows their syntactic relation to each other. It translates it to object code
where it links to read executables.

COMPILER TO BINARY

Process -
HIGH LEVEL LANGUAGE (COMPILER)

COMPILATOR

ASSEMBLY CODE

ASSEMBLY

OBJECT CODE

LINKING

MACHINE CODE (BINARY)

Machine Code:
 Low level language
 Only language directly understood by computer
 Causes computer to execute specified operation
 Vary from CPU to another
 Simple Instructions
 Only made of 1’s and 0’s (binary)
Assembly Code:

 Low level language, similar to machine code


 Usually a 1 to 1 correspondence between assemble instructions and machine
instructions
 Uses mnemonics for instructions
 May use variable names for memory location

COMPLEMENT
1’s complement – flips all bits

2’s complement – flip all bits, add 1

EXTENDED BACKUS NAUR FORM (EBNF)

Repeated zero or infinite times.

NONE or 1.

A|B|C|D
Either A, B, C or D.
CHARTS
System Flowcharts

System flowcharts are used to describe the logic and flow of data throughout a system,
including the interactions between the input, processing, output and storage, as well as the
nature of each component.

Data Flow Diagrams (DFDs)

DFD describe the path data through a system. It does not indicate the timing of events but
show the steps in which data flows.
Structure Charts
Structure charts are used to model the hierarchy of subroutines within a system, together
with the sequence in which these subroutines take place. This improves the reader’s
understand between the relationship of data movements between these subroutines.
Context Diagram
Context diagrams, also known as level 0 DFD shows in which a single process connects to
external entities in which data flows.

Das könnte Ihnen auch gefallen