Topic 4 Computational Thinking

studied byStudied by 2 people
0.0(0)
get a hint
hint

Decision Making Process

1 / 83

84 Terms

1

Decision Making Process

  • Identification

  • Development

  • Selection

  • Implementation

New cards
2

Ways to express an algorithm

  1. Simple English (Not very common bc it is verbose and ambiguous)

  2. A flow chart (avoids issues of ambiguity)

  3. Pseudo code (combines programming language and written language)

  4. Programming Language (ways to communicate with a computer system)

New cards
3
<p>What does this symbol mean in flowcharts?</p>

What does this symbol mean in flowcharts?

Input/Output

New cards
4
<p>What does this symbol mean in flowcharts?</p>

What does this symbol mean in flowcharts?

If/While/For

New cards
5
<p>What does this symbol mean in flowcharts?</p>

What does this symbol mean in flowcharts?

Start/end

New cards
6
<p>What does this symbol mean in flowcharts?</p>

What does this symbol mean in flowcharts?

Declaration/Assignment

New cards
7
<p>What does this symbol mean in flowcharts?</p>

What does this symbol mean in flowcharts?

Call a method/function

New cards
8
<p>What does this symbol mean in flowcharts?</p>

What does this symbol mean in flowcharts?

Connector

New cards
9

Psuedocode

Meant to help programmers develop computer programs. The syntax used is not as strict as the one used in computer languages.

New cards
10

Top down design or stepwise refinement

breaking up the problem into smaller sub problems, very effective and efficient.

New cards
11

Iteration

Process of repeating a series of instructions. It is extremely useful in programming and is used to repeat a statement or a block of statements within an algorithm.

New cards
12

Conditional Statement

Performs different instructions depending on a Boolean test.

New cards
13

If - then - else conditional statement

When an If is used, the boolean condition must be evaluated before executing the statements. Otherwise it will continue to the else statement, if there is no else then it will move to the end if.

New cards
14

Logical rules or Rules of Inferenece

Programming and algorithmic thinking involves the translation of these rules into algorithms.

New cards
15

Input

Something that is put into a program

New cards
16

Output

Something that is produced by the program after a process

New cards
17

Pre-Planning

the process of planning something in advance

New cards
18

Prefetching

broad terms means getting data or instructions from memory into the cache before they are actually needed. When a program requests data that was previously pre-fetched, it can use the pre-fetched data and continue with execution.

New cards
19

Gantt Chart

type of bar chart. It is widely used for project schedule and project management, as a way of showing activities, tasks, and events against time. On the left of the chart is a list of the tasks, activities, and events. Along the top is an appropriate time scale.

New cards
20

Exception

an act or event that disrupts the anticipated flow of the program’s execution. The exception take place during the execution of the program and can be effectively handled by specific mechanisms that most modern programming languages provide.

New cards
21

Concurrent Processing

The execution of different instructions simultaneously by multiple processors so as to achieve the best performance.

New cards
22

Simplified explanation

programs are broken down into procedures and procedures are broken down to sub-procedures.

New cards
23

Abstract Thinking

reflecting on events, ideas, attributes and relationships in a general manner that hides all unnecessary details of specific objects. All information that is not necessary to accomplish a goal is removed and ignored and a generalization technique is implemented.

New cards
24

Object - Oriented Programming

Uses abstraction and is based on the principle that everyday tasks can be considered as entities.

New cards
25

Collection

A data structure that consists of the data and the predefined methods which operate on the data. Some collections allow custom specification of the collection item elements.

New cards
26

Abstract Data Type (ADT)

Group of operations and data.

New cards
27

Mathematical Modeling

Process where a system is understood well enough and scientists describe it using mathematical language. A set of mathematical rules is used to describe the function of the particular system. It is clear that the mathematical model is an abstraction of the real system.

New cards
28

Array

can hold multiple data elements of the same type. An array has a name, a static size, and a data type. 1-D arrays are linear.

New cards
29

Parallel Arrays

Data organized as a table. Each row represents a particular student and all columns are of the same data type.

New cards
30

Array of Objects

Array of reference variables. Each reference variable is an element of the array and it’s a reference to an object.

New cards
31

Binary Search

Searching method used only in sorted arrays. Relies on divide and conquer strategy to accomplish its purpose.

  • It works by comparing the target value to the middle

  • If they aren’t equal, the lower of upper half of the array is eliminated depending on the results and the search is repeated in the remaining sub-array until it is is successful

New cards
32

Sequential or Linear Search algorithm

Very simple method to find a particular element in an array. Considered to be the simplest search algorithm. Does not require the use of a sorted arrays and it relies on brute force strategy to accomplish its purpose.

  • Starts with the first element and compares each element to the one it’s looking for, until it is found

New cards
33

Advantages of Concurrent Processing

  • Increase computation speed

  • Increases complexity of programming language and hardware (machine communication)

  • Reduces complexity of working with array operations within loops, conducting parallel searches in data based, sorting files, etc.

New cards
34

Reasons for Gantt Charts

  • Efficient organization; helps establish timeframe

  • Highly visual, easy to stick to

New cards
35

Reasons Against Gantt Charts

  • Potentially over complex

  • Needs to be constantly updated if project requirements change

  • Doesn’t show whole picture; details of task

New cards
36

Batch processing

Large amount of input happens over time, then whole set of input is processed in one go

New cards
37

Online Processing

Input processed almost immediately

New cards
38

Real-time processing

Input processed immediately and continuously; generally without any user input, of which comes from system sensors

New cards
39

Types of Flowcharts

  • Algorithm Flowchart: each process represented by a flowchart symbol, started in detail

  • System Flowchart: most basic, general overview of the system itself, with no detail

New cards
40

Bubble Sort (“Swap to Sort”)

Repeatedly steps through the array to be sorted. It compares adjacent items and exchanges them if they are not in the correct order (ascending or descending). The algorithm makes multiple passes until no swaps are necessary and the elements of the array are sorted.

New cards
41

Selection Sort (Sublist to Sort)

Very simple and inefficient sorting algorithm that divides the input array into two sub arrays: the first array are already sorted elements and the second sub-array contains the unsorted elements and occupies the rest of the array.

New cards
42

Generic Collections

Can only hold data of the same elements

New cards
43

Non Generic Collections

can hold elements of different data types.

New cards
44

Advantage of Collections

They can hold different data types and can act like a resizable array

New cards
45

addItem(data)

Used to add an item in the collection

New cards
46

getNext()

return the first item in the collection when it is called

New cards
47

resetNext()

starts at the beginning

New cards
48

hasNext()

tells whether there is another item the list

New cards
49

isEmpty()

check whether collection is empty

New cards
50

What are the predefined sub-programs (Collection Methods)

  • addItem()

  • getNext()

  • resetNext()

  • hasNext()

  • isEmpty()

New cards
51

Efficiency

The amount of the computer resources required to perform its functions. Minimizing the use of various resources such as the CPU and computer’s memory is very important

New cards
52

Correctness

the extent to which the algorithm satisfies its specification, free from faults, and fulfills all objectives set during the design and implementation phase

New cards
53

Reliability

the capability of the algorithm to maintain a predefined level of performance and perform all required functions under stated conditions, having a long mean time between failures

New cards
54

Flexibility

the effort required to modify the algorithm for other purposes than those for which it was initially developed

New cards
55

Big O notation

measure of the efficiency of an algorithm. O(n), where n is the number of times am algorithm was executed.

New cards
56

flag

a variable used to indicate a condition. when the condition is changed the value of the flag is changed. Usually a Boolean variable and is used to terminate a loop.

New cards
57

Lists

used to store a sequence of values under s single name. Allow duplicated to act as containers and to be typically implemented either as linked lists or as arrays.

New cards
58

Fundamental Operations

  • Add

  • Compare

  • Retrieve

  • Store

New cards
59

Compound Operations

Combining fundamental computer operations. Example: find max.

New cards
60

Semantics

The meaning of every construction that is possible in the language

New cards
61

Syntax

Structure of a programming language

New cards
62

Assembler

used to convert the assembly language mnemonics to machine code

New cards
63

High Level Programming Language

Programming language that uses elements of natural language, is easy to use, facilitates abstraction by hiding significant areas of computing systems, and makes the program development simpler, faster, and more understandable.

New cards
64

Compiler

When a high-level language is translated into lower-level language. Translation into machine code for final execution.

New cards
65

Interpreter

When a high-level language is translated into an intermediate code which will be immediately executed by the CPU (done line by line). Warns syntax error, shows outputs for tested processes.

New cards
66

Variable

a storage location for data in a program. They are a way of naming a memory location for later usage. Each variable has a name and a data type that is determined at its creation and cannot be changed

New cards
67

Constant

an identifier with an associate's value which cannot be altered by the program during execution. Opposite of a variable (putting “final”)

New cards
68

Operator

A set of characters which represents an action. Types:

  • Boolean: (And/Or && ||)

  • Arithmetic Operators: (± div mod)

  • Assignment Operator: =

  • Relational Operators: (>, ==, !=, .equals())

New cards
69

Object

comprised of data and actions. Actions refer to the operations that can be performed by the object. Object data may include a number of data members, while actions may also be referred to as methods.

New cards
70

=

is equal to. Used to assign a value to a variable. Min = 6.

New cards
71

not equal to. Min ≠ Max

New cards
72

>

is greater than

New cards
73

>=

is greater than or equal to

New cards
74

<

less than

New cards
75

<=

less than or equal to

New cards
76

div

“integer part of quotient”

New cards
77

mod

modulo operation. Calculates the remainder of division of one number by another.

New cards
78

Scope

the visibility of that variable. It defines which parts of the algorithm can store, access, and retrieve the data of the variable.

  • Global variable is visible to all parts of your program

  • Local Variable has limited scope.

New cards
79

Container/Collection

Consisted of 0 or more elements such as objects and values. It is equipped with the necessary operations to handle data. Collections allow duplicate elements and may contain ordered and unordered data elements.

New cards
80

Sub-Program

unit that contains a sequence of computer instructions that perform a specific and pre-defined task

New cards
81

Code reuse

allows programmers to take advantage of existing code and solutions developed by other programmers to speed up their tasks. Code reuse saves time and resources and allows for the completion of demanding projects in the shortest period of time

New cards
82

Software LIbraries

Contain sub-programs that can be used by different types of programs

New cards
83

Advantages of Breaking Program into Sub-Programs

  • Breaking down a complex programming job into simpler jobs

  • Distributing a very large programming problem among various programmers all over the world

  • Enabling code reuse across multiple programs

  • Facilitation of abstraction by hiding implementation details from uses of the subprogram

  • Improving maintainability and traceability

  • Reducing programming code duplication within the same program

New cards
84

Advantages of Using Collections

  • The methods of collections are predefined algorithms that the programmer can immediately use

  • Performance is increased by the data management capabilities provided by the collection

  • Software reuse is facilitated because the use of methods is based on a common language and standard interface.

New cards

Explore top notes

note Note
studied byStudied by 19 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 977 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 17 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 26 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 59 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 139 people
Updated ... ago
5.0 Stars(3)

Explore top flashcards

flashcards Flashcard126 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard45 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard36 terms
studied byStudied by 100 people
Updated ... ago
5.0 Stars(6)
flashcards Flashcard55 terms
studied byStudied by 47 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard167 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard131 terms
studied byStudied by 27 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard140 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard153 terms
studied byStudied by 32 people
Updated ... ago
5.0 Stars(1)