WorksheetsUnit 2
Total questions: 49
Worksheet time: 25mins
Which form of abstraction involves grouping together similarities within a problem to identify what kind of problem it is?
Abstraction by generalisation
Abstraction by value
Abstraction by size
Abstraction by date
What is meant by data abstraction?
A form of abstraction in which details about how data is being stored are hidden.
A form of abstraction in which details about how data is being stored are shown.
A form of abstraction in which details about how information is being stored are hidden.
A form of abstraction in which details about how information is being stored are hidden.
What kind of problems make use of multiple levels of abstraction?
Large, complex problems
Small, complex problems
Large, simple problems
Small, simple problems
How does abstraction allow non-experts to make use of a system?
Hides complex and irrelevant information in abstract models.
Displays the answer in easy to understand language
Breaks the problem into small parts
Problem can be split between multiple developers
State two 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.
Easier to remember syntax in high-level languages as it is closer to natural language
Methods are an abstraction for the actions a real-world object is able to perform.
State 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
Programming becomes more secure
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.
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.
Easier to remember syntax in high-level languages as it is closer to natural language
Coding becomes accessible to beginners
What is the difference between abstraction and reality?
Abstraction is a simplified representation of reality
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.
Easier to remember syntax in high-level languages as it is closer to natural language
What is the purpose of thinking ahead?
To make programs easy and intuitive for users to use.
selecting data from a larger pool to show only the relevant details to the object. It helps to reduce programming complexity and effort.
break down your project scope into manageable chunks.
observe and analyze phenomena, reactions, and feedback and then draw conclusions based on that input.
Define inputs.
Any data that is required to solve a problem, usually entered into the system by the user.
Hardware peripherals
The results that are passed back once the outputs have been processed and the problem solved.
Open source software
proprietary software
Define outputs
The results that are passed back once the inputs have been processed and the problem solved.
Any data that is required to solve a problem, usually entered into the system by the user.
Hardware peripherals
Open source software
proprietary software
What considerations do programmers need to make regarding inputs and outputs when thinking ahead?
Method of input/output (device used)
Data structures used
Data types used
Order of data
Identify the inputs that are likely to be used in a book reservation system i.e. at a library.
Book details: name, author
ISBN
Borrower details: name, library card<br />number
Collection point
Book cost
Identify the outputs that are likely to be used in a book reservation system i.e. at a library.
Expected waiting time
Confirmation
Availability at other libraries
Book cost
Borrower details: name, library card number
What are preconditions?
Requirements which must be met before a program can be executed.
Requirements which must be met before a program can be designed.
Requirements which must be met before a program can be concieved.
Requirements which must be met before a program can be tested.
State two advantages of including preconditions within the documentation accompanying a subroutine.
Reduces the length of the program
Reduces the complexity of the program
Reduces the running time of the program
Reduces the length of the documentation
Define caching.
The process of storing instructions or values in cache memory after they have been used, as they may be used again.
Requirements which must be met before a program can be executed.
Requirements which must be met before a program can be designed.
Requirements which must be met before a program can be concieved.
Requirements which must be met before a program can be tested.
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.
The process of storing instructions or values in cache memory after they have been used, as they may be used again.
Requirements which must be met before a program can be executed.
As developing from scratch is not required, this saves time, money and resources.
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
Accuracy of the algorithms used
What is the name given to the technique in which instructions are fetched based on algorithms which predict which instructions are likely to soon be used?
Prefetching
Caching
Preconditions
Reusable Components
Give a limitation of caching.
Accuracy of the algorithms used
Effectiveness of algorithm in managing the cache
Content can be loaded without delay
Images and text do not have to be downloaded again multiple times
Less time is spent waiting
Give some advantages of using reusable program components.
More reliable than new components, as they have already been tested
As developing from scratch is not required, this saves time, money and resources.
Frees bandwidth for other tasks on a network
Content can be loaded without delay
Reduces the length of the documentation
Give two examples of reusable program components
Abstract data structures eg. queues and stacks
Classes
Prefetching
Preconditions
Caching
What is the first stage of thinking procedurally?
Taking the problem defined by the user and breaking it down into its constituent parts
Developing a solution
Testing a solution
Analysing a problem
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.
The process of separating ideas from specific instances of those ideas at work
Any situation in the design or programming of a system when you would want more than one thing happening at the same time
Letting the problem rot away
State another name given to top-down design.
Stepwise refinement
Problem Recognition
Divide and Conquer
Problem Decomposition
Backtracking
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.
The analysis of a large amount of data in a data warehouse to provide new information.
An algorithm for finding a complete solution. This is a refined brute force methodology. It is a very general algorithm for finding all (or some) solutions to computational problems.
The process of separating ideas from specific instances of those ideas at work
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
Uses abstraction to create algorithms and prototypes
Wireframe designs are required before development can take place
What sort of problems is top-down design suited to?
Large, complex problems
Small, complex problems
Large, simple problems
Small, simple problems
What is the second stage of thinking procedurally in software development?
Identifying components of a solution
Taking the problem defined by the user and breaking it down into its constituent parts
Developing a solution
Testing a solution
What are the lowest level subproblems in top-down design in code?
self-contained modules or subroutines
Machine Code
High Level Language
Flow Chart
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.
Who the original author of the component was
Will they fit together
What must a software developers 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.
Taking the problem defined by the user and breaking it down into its constituent parts
Developing a solution
Testing a solution
Analysing a problem
State advantages of utilising reusable components.
More reliable than newly-coded components, as they have already been tested.
This saves time, money and resources.
Accuracy of the algorithms used
Effectiveness of algorithm in managing the cache
Content can be loaded without delay
What is concurrent thinking?
Concurrent thinking is completing more than one task at any given time.
Concurrent thinking is considereing multiple possible solutions
Thinking about raisins
Concurrent thinking is when a programmer consideres other applications that already exist concurrently
Are concurrent processing and concurrent thinking the same thing?
No
Yes
That’s subjective
In some cases
What is parallel processing?
Parallel processing is completing multiple tasks simultaneously at any given time.
Parallel processing is when a processor fetches the next instruction whilst the current is being executed
Having multiple processors working on the same task
What is concurrent processing?
Concurrent processing is giving a slice of processor time to tasks to give the illusion of parallel processing.
Concurrent processing is completing more tasks in the same amount of time
Concurrent processing is
Bees
What are the benefits of concurrent processing?
More tasks can be completed in a given time
than one task at any given time.
It stops fraud
It slows down the CPU
It allows pipelining
What are the drawbacks of concurrent processing?
If lots of users are requesting for tasks to be completed, it takes longer for everyone to complete their task.
It slows down the internet
It lowers your credit score
It takes longer on larger tasks
None
