2.1 elements of computational thinking Flashcards
2.1.1 thinking abstractly
ughhhhh
what is abstraction?
a technique in which excessive details are removed to arrive at a representation of a problem that consists of only the key features
representational abstraction
the process of analysing what is relevant to a give scenario and simplifying a problem based on this information
what is abstraction by generalisation
grouping together similarities within a problem to identify what kind of problem it is
data abstraction
details about how data is being stored are hidden
procedural abstraction
allows programmers to ignore the complexity of how a procedure is implemented and concentrate on its usage within the system
what kind of problems make use of multiple levels of abstraction
large, complex problems
how does abstraction allow non-experts to make use of a system
hides complex and irrelevant information in abstract models
advantages of using abstraction in software development
-easier for programmer to focus on core elements
-reduces the time needed to be spent on the project
-prevents program from getting unnecessarily large
two applications of layers of abstracions
-networking (TCP/IP layer)
-programming languages
TCP/IP model
an abstraction for how networks function. Consists of 4 layers:
-application
-transport
-network
-link
advantages of using abstraction in programming languages
-easier to remember syntax in high level language as it is closer to natural language
-coding becomes accessible for beginners
what is the difference between abstraction and reality
abstraction is a simplified representation of reality
how are real world entities represented
using computational structures such as tables and databases
how does object-oriented programming use abstraction
-objects are an abstraction for real world entities
-attributes are an abstraction for the characteristics of an object
-methods are an abstraction for the actions a real-world object is able to perform
when devising an abstract model u must consider:
-what is the problem that needs to be solved by the model?
- How will the model be used?
-Who will the model be used by?
- Which parts of the problem are relevant based on the target audience and the
purpose of the model?
2.1.3 thinking procedurally
hmmmmm
what is the first stage of thinking procedurally
taking the problem defined by the user and breaking it down into its component parts
problem decomposition
a large, complex problem is continually broken down into smaller subproblems which can be solved more easily
what is the purpose of problem decomposition
to make complex problems easier to solve and more manageable by allowing tasks to be divided between a group of people according to individual skill sets
another name given to top-down design
stepwise refinement
what is the purpose of top-down design
continually breaks problems down into
subproblems until each subproblem can be
represented as a single task and ideally a self-contained subroutine or module
benefits of using top-down design
-problems can be solved and modules developed by different people
-tasks can be tested separately. Modules are self-contained
what type of problem is top-down design suited for
large, complex problems
how to identify components to solution
each programmer must evaluate the component of the problem allocated to them and assess how it can best be solved.
what must a software developer do before designing a subroutine to solve a particular problem
see weather it is possible for an already existing sub-routine or module to be used
what do software developers need to consider when recombining components of a solution
the order in which subroutines are executed, and how they interact with each other, based on their role in solving the problem
two advantages of utilising reusable components
-more reliable than newly-coded components as they have already been tested
-saves time, money and resources
2.1.4 thinking logically
uffff
what is a desicion
a result reached after some consideration.
It is made whenever you have a choice to make
-what shape is given to decision icon in flowchart
-how many options can u pick from
-a diamond
-2, yes/no, true/false
Conditions that affect the outcome of a decision
- What is most effective?
- What is most convenient?
- Is this option reasonable?
how to make effective decisions
by evaluating the importance of different factors and selecting options that satisfy the needs of the task the most appropriately
how does the result of a decision affect the flow of a program
the program will follow a different route depending on the decision made by the user