Last Minute Paper 2 Content

studied byStudied by 7 people
0.0(0)
Get a hint
Hint

Abstraction

1 / 28

flashcard set

Earn XP

29 Terms

1

Abstraction

  • Separating ideas from reality…

  • by removing irrelevant details…

  • to create a focused representation of reality.

New cards
2

How to/why abstract?

  • Remove unnecessary elements…

  • to reduce unnecessary programming…

  • which would require extra computational resources…

  • and detracts from the main purpose of the program.

New cards
3

Realities relationship to Abstraction

  • Abstraction is a simplified version of reality in which…

  • real-world entities are represented as tables in databases and…

  • real-world values are stored as variables and constants.

New cards
4

Thinking Ahead + why do it?

Identifying the…

  • Preconditions

  • Inputs

  • Outputs

  • Reusable components

  • Caching

…of a system.

We do this to maximise efficiency and minimise errors.

New cards
5

Preconditions

Conditions that must be true for an algorithm to complete successfully without errors. For example:

  • A binary search algorithm must be supplied with an ordered list.

New cards
6

Reusable Program Components + Benefits/Drawbacks

  • Commonly used functions are packaged into libraries.

  • Reusable components like:

    • Classes

    • Subroutines (Functions or Procedures)

    • Abstract Data Structures (Queues & Stacks)

  • + More reliable than new code as they’ve been tested.

  • + Saves time, money, and resources.

  • + Can be used in future projects.

  • - Components may need to be modified to be compatible with a project.

New cards
7

Caching + Benefits/Drawbacks

Storing instructions/data in cache memory after they’ve been used as they might be frequently used.

  • + Faster than RAM or Secondary Storage so saves time

  • - Cached data may not reflect latest updates to that data. (E.G a webpage you frequent may be cached, but it may have been updated since you last visited)

New cards
8

What is Thinking Procedurally?

Decomposing a problem to identify it’s components.

New cards
9

Sequence, Selection, and Iteration (Branching)

  • One statement after another

  • Code is executed line by line, from top to bottom


  • Decision-making points (if else, switch case)


  • Loops (for, while, do until)

New cards
10

What is Thinking Concurrently?

Identifying parts of the problem that can be tackled at the same time.

New cards
11

Concurrent Processing

When system appears to do multiple things simultaneously (on one core) but it kinda switches between them really quickly so they are done ‘at the same time’.

  • “One process does not have to finish before the other starts” - mark scheme

  • “Processes are happening at the same time / at overlapping times” + “Only 1 process can actually happen at a time on a single core processor, concurrent tries to simulate multiple processes”

New cards
12

What is a Procedural Programming Language?

A high-level language that gives a series of instructions in a logical order. (what to do and how to do it)

New cards
13

What is a Parameter and how to pass to a subroutine?

Data structures that are passed into a subroutine when called.

  • By Value: A local copy of the data in the variable is used, and then discarded, so the original data is unaffected.

  • By Reference: Reference to the variable's memory location is passed to the function, which means the actual value is affected.

New cards
14

Variables + Scope

Identifier of a memory location used to store data.

The range that a variable is accessible for.

Local Scope:

  • Accessible in the subroutine that it was defined in.

  • Eraed when subroutine ends

  • + Ensures subroutines are self-contained

Global Scope:

  • + Accessible across the entire program.

  • + Risk of being unintentionally edited.

  • - Requires more memory as not deleted until the program ends

New cards
15

What is an IDE? + Features?

Integrated development environment. A single program that is used to develop programs.

  • Syntax highlighting to identify mistakes quickly

  • Stepping to run one line at a time and check the result

  • Variable watch to check the value of variables during execution

  • Error messages to locate errors

  • Breakpoints to stop and test the program works up to certain points

New cards
16

Recursion + Essential features?

  • Routine calls itself…

  • and has a stopping condition…

  • which must occur after a finite number of calls.

New cards
17

Function vs Procedure

A block of code with a unique name to call it to complete a task. Takes parameters.

  • Function is Fun so returns a value.

  • Procedure does not return a value.

New cards
18

Recursion Vs Iteration

  • Recursion:

    • + Fewer lines of code

    • + Better for a problem can’t be solved with a fixed amount of memory.

    • More likely to cause a stack overflow

  • Iteration:

    • + Easier to follow/understand

    • + Faster

New cards
19

Benefits/Drawbacks of Concurrent Processing?

  • + More tasks completed in a given time.

  • + Less time wasted waiting for input/interaction, as other tasks can be completed during the waiting.

  • - May take longer when a lot of users/tasks are involved.

  • - Long to coordinate and switch between processes.

  • - Task may not be suited to be broken up and performed concurrently

New cards
20

Class, Object, Attributes in OOP

  • A Template of an object that defines the state (attributes) and behaviour (methods) of objects.

  • An instance of a class

New cards
21

Benefits of OOP

  • Modular

  • pluggable

  • protected

  • reusable

  • faster development

New cards
22

Encapsulation

  • Bundling attributes and methods together within a class.

  • Ensures data remains secure and is not unintentionally modified (by making attributes private)

  • Hides complexities

New cards
23

Polymorephism

New cards
24

Backtracking

When an algorithm finds a solution by trying different sequences and abandoning a path that leads to an invalid solution.

New cards
25

Data Mining

Identifies patterns and trends in large data sets.

New cards
26

Pipelining

New cards
27

Breadth First Traversal

From left to right, visit children of root/start node. Then visit children of each of those nodes, still left to right. Continuing until every node has been visited.

New cards
28

Depth-first (Post order)

Goes as far into the tree as possible. Goes to the left child node when possible, if not possible then goes to the right. When it get’s to the point of when a node has no children, it visits that node. Backtracks to the previous node, attempts to go right, if it can, then contin

New cards
29

Performance Modelling

Testing a system before it is used by users.

New cards

Explore top notes

note Note
studied byStudied by 18 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 43 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 15 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 58 people
Updated ... ago
5.0 Stars(3)

Explore top flashcards

flashcards Flashcard40 terms
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard85 terms
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard62 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard58 terms
studied byStudied by 35 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard34 terms
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard55 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard84 terms
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard40 terms
studied byStudied by 27 people
Updated ... ago
5.0 Stars(8)