1/32
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What does designing a solution entail?
thinking of the different components of a problem
and how they will be handled in the best way
Why is thinking ahead important when designing a solution?
allows developers to consider problems or difficulties
that may arise when the software is used
what happens to inputs and what are they in this context?
inputs are processed to produce an output
such as data required to solve the problem ,
which is entered into the system by the user
wha are outputs?
results that are passed back
once the inputs have been processed and the problem solved
What do designers typically begin by considering?
considering what outputs are required
based on the user’s requirements.
What is the next step after identifying the required outputs?
identify the inputs required
and how these need to be processed
to achieve these outputs.
what are preconditions
requirements which must be met
before a program can be executed
(if not, the program will fail to execute / return an invalid answer)
what does including preconditions do?
reduces the length and complexity of the program
saving time needed to debug and maintain a longer program
makes subroutines more reusable
what happens to commonly used functions?
can be stored in libraries for reuse
useful for teams working on large projects
whats the advantages of using reusable components?
more reliable as tehy’ve been tested / bugs dealt with
saves time and money
subroutines can simply be reused in future, saves development costs
disadvantages of reusable components?
might not always be possible
because of compatibility issues
so they might be modified which could be more costly than developing on your own
what is abstraction
removing unnecessary details
and focusing on the key features
representational abstraction?
analysing whats relevant to a scenario
simplifying a problem based off that
abstraction by generalisation?
grouping together similarities within a problem,
to identify what kind of problem it is
allows certain problems to be categorised as being of a particular type
data abstraction
when details of how
data is being stored
are hidden
so programmers can make use of abstract data structures (stacks, queues, etc.,)
without needing to know how they are implemented
procedural abstraction
models what a subroutine does
without considering how
or knowing about the code used to implement it
what will complex problems make use of?
multiple levels of abstraction
high level abstraction = ?
closest to the user
provide the interface to interact with the hardware
(LESSS DETAILL)
low level of abstraction = ?
responsible for performing the task
though machine code
(LOTSSS OF DETAIL)
benefits of abstraction?
Reduces programming time
Reduces complexity of code (through abstraction by generalisation)
Reduces amount of memory required / computational power
Simplifies the problem so it's easier to solve / understand (by recognising common patterns)
Allows programmers to focus on core aspects of the problem
abstraction vs reality
abstraction is a simplified representation of reality
real-world entities can be represented using computational structures (tables)
real world values can be stored a variables
thinking procedurally
breaking down a complex problem into smaller parts
benefits of thinking procedurally
Splits the problem into smaller chunks
Smaller problems are more manageable
Smaller problems are easier to solve
To see where code can be reused in the solution
To split tasks between different programmers
Decomposition splits the problem into smaller sub problems
The division can lead to the development of subroutines/modules
The division can lead to a logical division between programmers/teams
whats a top-down design?
also known as stepwise refinement
a preferred method used to approach very large problems
breaks problems into levels
whats the aim of top-down designs?
to keep splitting problems into sub-problems until each sp can be represented as a single task
and ideally a self-contained module or subroutine
can then be solved by a different person
also be tested separately
whats thinking logically
identifying when to make a decision
e.g. using a flowchart
what does thinking logically allow us to do?
determine the complexity of an algorithm
identify at which points a decision is needed
determine the conditions of the decision
determine the next steps depending on the outcome of the decision