component 2 Flashcards
why is abstraction needed
programmer to focus on the important aspects of
a problem
which enables teams of programmers to work on different aspects of a problem
and
enables programmers to use pre-built and built-in functions without
concerning themselves with how they work.
examples of abstraction : 6
variables
✚ objects
✚ layers
✚ data models
✚ data structures
✚ entity-relationship diagrams.
diffremec between abstraction an reality
abstraction is a simplification of reality it does not take into account external factors of a problem from the real world (time delays)
do not give an exact or definite overview of the actual events in the real world.
abstraction in UI
remove distracting things and include
useful icons - times, volume signal strength
e.g car gps (inserted of film outside area use what is listed above)
and important information for user
why is thinking ahead important
maximise code efficiency
minimise erros
identify futur consequences
what does thinking ahead involved
s planning inputs and outputs.
thinking ahead Identify the inputs and outputs for a given
situation
n. When the
functions of a program are described, they are essentially a description of
what outputs it will produce. These may be:
✚ on-screen information
✚ printed data
✚ data to be stored
✚ actions for the computer to complete.
, the source of those inputs and the order and
format in which they are supplied is an important consideration.
The designer must decide upon the data types and data structures required
for the proposed solution to the problem.
define precondition
the requirements that must be met before the program
can run.
preconditions can be specified within documentation a
✚ requirements for the device specification to be able to run the program
✚ the operating system required to run the program
✚ any necessary additional software or hardware.
preconditions When planning the development of a program or routine:
When planning the development of a program or routine:
✚ subprograms will need the correct data passed to them
✚ input data should be validated to ensure it meets essential criteria
✚ actions need to be validated to ensure they will not crash the program if
erroneous results are returned.
what is caching
the process of storing instructions or values in cache memory after they have been used, as they may be used again.
how are reusable programs a benefit
Reusable components include implementations of abstract data structures such as queues and stacks as well as classes
hen designing a piece of software, the problem is decomposed: it is broken down into smaller, simpler tasks. This allows developers to identify where program components developed in the past, or externally-sourced components, can be reused to simplify the development process.
why is it better to use reusable program components
more reliable than newly-coded components, as they have already been tested. This saves time, money and resources.
Producing well-tested,reusable components means that they can be reused in future projects, saving development costs.
Disadvantage of use reusable programs
may not be compatible with the whole software so it may be a problem to integrate existing components This might mean these components need to be modified to work with existing software, which can sometimes be more costly and time-consuming than developing them in-house.
the process of thinking procedurally is Calle
decomposition
define decomposition
the process of breaking down large and complex problems into smaller sub- problems to make its more manageable and easier to solve
why is decomposition good
The project becomes easier to manage and can be divided between a team
designed used to show decomposition
top down hierarchy
1. the problem
2. main components
3. sub- problems for each main component
how ar steps ordered to solve a problem things to consider
When constructing the final solution, thinking about the order in which operations are performed is important.
● Programs may require certain inputs to be entered in a particular order by the user before processing can occur
Inputs need to be validated, and this must occur before this data is used.
what does thinking logically mean
understanding where decisions need to be made
and their consequences.
define paradigm
is used to specify an overall approach to writing program code.
conditions taht affect outcome of a decision
- order of importance
evaluation of conditions (is this option reasonable?it it conveieninent? etc)
what is concurrent thinking
the process of completing more than one task at a given
time.