Decomposition is breaking a complex problem into lots of smaller ones
Abstraction is simplifying a problem by removing unnecessary details
Algorithmic thinking is coming up with a series of logical steps to create a solution
Rounded rectangle = start or stop
Parallelogram = inputs or outputs
Rectangle = processes
Diamond = decision
Arrows must be used in flowcharts to show the flow of data
Sequence = only one route from the beginning to the end
Selection = having decisions creating multiple routes from beginning to the end
Iteration = a loop that makes you repeat a task
Linear Search
Searching each value in the list in order until the search is complete
Binary search
(N+1)/2 and round up if needed repeated until the search is complete
List must be ordered first
Binary search
Advantages are: efficient at searching large lists
Disadvantages are: list must be ordered first
Linear Search
Advantages are: it's simple, it works on unordered lists
Disadvantages are: it is inefficient on long lists
Bubble sort
Comparing and swapping values until the list is ordered
List is only ordered when a pass without any swaps is done
Insertion sort
Adding a new value to the list in the correct place in each pass
Merge sort
Split the list into sublists and order the sublists, then combine/order the sublists
Bubble sort and insertion sort
Advantages are: simple and easy to implement, quick to check if list is already sorted, it doesn't need much memory
Disadvantages are: inefficient on large lists
Merge sort
Advantages are: efficient on large lists, running time isn't effected by the order of items in the original list
Disadvantages are: slower on small lists, goes through the whole process even if the list is already sorted, uses more memory to make sub-lists
Integer = whole number
Real / Float = decimal numbers
Boolean = true or false
Character = one letter,symbol or digit
String = a collection of characters
Constant values cannot be changed whilst the program is running
Variables are values that can be changed whilst the program is running
Inputs receive data from a user
Outputs display data to the user
Div gives the whole number part of the division
Mod gives the remainder of a division
LogicGates
Ways to improve maintainability:
Write comments
Use indentation
Use descriptive names for variables
Use sub-programs
Validation checks:
Range check
Presence check
Format check
Look-up table
Length check
Authentication is confirming the identity of the user before allowing access
Ways to secure passwords:
Create strong passwords
Limit the number of failed authentication attempts
Require frequent password changes
Ask for a random selection of characters from the password
SQL
Columns = fields
Rows = Records
SELECT WHERE FROM
Sub program is a set of instructions stored under one name that are executed when called.They help improve code structure, improve readability and avoid repeating code.
Parameter is a variable used to pass data into a sub program and can be any data type
Argument is a value a parameter takes when a sub program is called