1/50
Made from P.M.T. and Ada comp. sci. notes
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is a decision?
A decision is a result reached after consideration.
What is the shape used for decisions in a flowchart?
A (decision) diamond
In a flow chart how many options can you pick from a decision?
2 different options - yes or no/ true or false
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.
What is abstraction?
The process of separating ideas from particular instances (of a problem) / reality. It is a representation of reality in which unnecessary detail is removed so that only the key features remain.
What is representational abstraction?
The process of removing unnecessary details to produce a representation of a problem that consists of only the key features
Which form of abstraction involves grouping together similarities within a problem to identify what kind of problem it is?
Abstraction by generalisation
Which is abstraction by generalisation?
When you identify a problem as an example of a more general set of problems
What is data abstraction?
A form of abstraction in which details about how data is being stored are hidden.
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.
What are the advantages of using abstraction in software development?
Easier for programmers to focus on core elements
Reduces the time needed to be spent on the project.
Prevents program from getting unnecessarily large
What are two examples of layers of abstraction?
Networking (TCP/IP layer)
Programming languages
What are two advantages of using abstraction in programming languages?
Easier to remember syntax in high-level languages as it is closer to natural language
Coding becomes accessible to beginners
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.
What is the difference between abstraction and reality?
Abstraction is a simplified representation of reality
What is functional abstraction?
When the implementation detail of the computational method is hidden.
What is problem reduction?
The process of generalising or reducing a problem to one that has already been solved.
What is automation?
The process of taking the model and implementing a solution. This is achieved by:
Implementing the data structures to store the data
Implementing the algorithms to process the data
What is the first stage of thinking procedurally?
Taking the problem defined by the user and breaking it down into its constituent parts
What is the second stage of thinking procedurally in software development?
Identifying components of a solution
What is decomposition?
The process of breaking a problem down into smaller subproblems that can be solved individually and more easily
What is another name given to top-down design?
Stepwise refinement
What is the purpose of top-down design?
Continually break problems down into subproblems until each subproblem can be represented as a single task and ideally a self-contained subroutine.
What are the 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 types of problems is top-down used for?
Large, complex problems
How is the lowest level subproblems in top-down design implemented in code?
As self-contained modules or subroutines
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.
What must a software developer do before designing a subroutine to solve a particular problem?
See whether it is possible for an already existing subroutine or module to be used.
What are two advantages of utilising reusable components?
More reliable than newly-coded components, as they have already been tested.
This saves time, money and resources.
What is the purpose of thinking ahead?
To make programs easy and intuitive for users to use.
What is an input?
Any data that is required to solve a problem, usually entered into the system by the user
What is an output?
The results that are passed back once the inputs have been processed and the problem solved
What four considerations do programmers need to make about inputs and outputs when thinking ahead?
Method of input/output (device used)
Data structures used
Data types used
Order of data
What are preconditions?
Requirements which must be met before a program can be executed.
Where can preconditions be defined?
Within the code or within documentation.
What are four advantages of including preconditions within the documentation accompanying a subroutine?
Reduces the length of the program
Reduces the complexity of the program
Saves time needed to debug and maintain a longer program
Makes subroutine more reusable
Define caching
The process of storing instructions or values in cache memory after they have been used, as they may be used again
What is an advantage of caching?
Saves time as you don’t need to wait for instructions to be retrieved from secondary storage again
How is caching used in storing web pages?
Web pages that a user frequently accesses are cached, so the next time one of these pages is accessed, content can be loaded without any delay
What are the advantages of caching web pages?
Content can be loaded without delay
Images and text do not have to be downloaded again multiple times
Frees bandwidth for other tasks on a network
Less time is spent waiting
What limits the effectiveness of caching?
Accuracy of the algorithms used
Effectiveness of algorithm in managing the cache
Size of the cache
What is the name given to the technique in which algorithms are used to predict which instructions are likely to soon be used?
Prefetching
What is prefetching?
When algorithms predict which instructions are likely to soon be fetched and are loaded and stored in cache
What is an advantage of prefetching?
Less time is spent waiting for instructions to be fetched
What are two advantages of using reusable program components?
More reliable than new components, as they have already been tested.
Since developing from scratch is not required, this saves time, money and resources.
What are three examples of reusable program components?
Abstract data structures eg. queues and stacks
Classes
Subroutines
What is parallel processing?
Parallel processing is completing multiple tasks simultaneously at any given time.
What is concurrent processing?
When each process is given a fraction of time and control over the processor before swapping to another process. This allows multiple processes to run on a single processor.
What are the benefits of concurrent processing?
More efficient use of processor time, so more tasks can be completed during a given time
Other tasks can be completed while waiting for an input/ user interaction
More efficient processing of interrelated tasks
What are the drawbacks of concurrent processing?
There is an overhead in coordinating and switching between processes, which reduces program throughput.
Not all tasks are suited to being broken up and performed concurrently.