





















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















































What is computational thinking? - Answer The ability to think logically about a problem in a way a computer can execute it and apply techniques for solving it using a set of problem solving methods. Why is computational thinking important? - Answer As many overarching problems are very difficult to understand What is the aim of computational thinking? - Answer To be able to make an overarching problem understood and then formally represented and solved What does computational thinking require? - Answer Computational thinking requires algorithmic thinking
What stages does algorithmic thinking require? - Answer - Understanding the problem
What is a data model? - Answer A data model is an abstract model that organises elements of data and how they relate to one another and to real world entities What is an entity relationship diagram? - Answer An entity relationship diagram is a graphical model to represent the relationship between different entitites What is an overall definition of generalisation? - Answer Generalisation is solving new problems based on previous problems for which we have an existing solution normally involving the use of an algorithm to solve a problem and adapting it so it can solve similar problems Why is abstraction required? - Answer Abstraction enables the programmer to focus on the important aspects of a program rather than focusing on unnecessary detail What does abstraction enable? - Answer Abstraction enables:
contained and independent of another ayer. For the programmer developing one layer of a system, all that is necessary is to know wha input requirements are for the next layer and what outputs are expected from the previous layer Outline how abstraction relates to reality - Answer Abstraction is a simplification of reality. Entities in the real world are represented by containers such as variables or data structures. The real world at a values are stored in these containers Describe how abstraction applies to object oriented programming - Answer In object oriented programming, the objects are abstraction of real world entities and the attributes and methods represent real world characteristics and actions When first developing an abstract model what must you consider? - Answer When first developing a model you must consider if the problem can be solved using a computer program If problem the abstract model is representing can be solved using a computer program what must you then need to consider? - Answer - What are the key features of the problem
What about the data must be considered when designed a proposed solution to the problem? - Answer The designer must decide upon data and structures required for the proposed solution to the problem What are preconditions? - Answer Preconditions are requirements which must be met before a program can be executed. Give examples of preconditions that can be specified within documentation - Answer - Requirements for the specification specification the device to be able to run the program
What is cache? - Answer Cache is very fast memory with L1 found on the CPU and cats as a temporary store for the most frequently used instructions and data. How is the contents of what's stored in cache determined? - Answer An algorithm anticipates what instructions and data will need to be stored there ready for fast access to improve efficiency and is vital component of thinking ahead Why is cached data important? - Answer Cached data can replace the need for recalculations or the need to transfer data from slow to access storage online or on a disk Give an example for how caching is used for web access - Answer Caching is used extensively for web access where frequently used pages are stored for future use What is the advantage for caching frequently used web pages? - Answer - content can be loaded with minimal delay
When developing programs how can certain commonly used functions be reused? - Answer Commonly used functions can be pre-written and be provided as libraries within the programming language for reuse by the programmer What are the advantages of reusing pre-written components - Answer The advantages of reusing pre-written components:
Describe how top level hierarchal structure diagrams are good visualisations for problems, their solutions and decomposition - Answer Top down design is used to make complex problems easier to understand and solve as each branch is repeatedly sub divided until the problem is broken down into tasks that are able to be solved at the lowest level What types of solutions may be inappropriate for top level diagrams? - Answer Event driven programs do not easily fit into the model of hierarchal structure as there are parallel strands for linked objects but the top down design can be used for the processes within these linked objects After decomposition has occurred what should then take place? - Answer Following decomposition, development for each individual solution should take place What could each solution for a decomposed subproblem be? - Answer - A pre existing function or subprogram
mathematical problem which have known rules that will be applied to produce the required output What is a paradigm? - Answer A programming paradigm is an approach to programming (not a particular type of language) What are the two main paradigms? - Answer procedural and object orientated When developing a computer solution what should be determined before starting? - Answer - The choice of programming paradigm
What may the choice of programming language determine? - Answer The choice of programming language may determine what is possible to code What may affect the choice of programming language? - Answer What is required of the code may determine the choice of programming language When may an assembler be chosen over a high level language? - Answer When coding for a small embedded system, an assembler is more likely choice than a high level language Give an example of a minor change to a condition that can drastically affect a code's output? - Answer using a > instead of >= Give an example of how a choice of loop can drastically change the output of a program? - Answer A repeat loop always executes at least once while a while loop may never have to run if the initial condition isn't met What user involved decisions may need to be considered when developing software? - Answer - Identify where the user will need to make decisions
What type of representation is an algorithm and what is the advantage of this? - Answer An algorithm is a generalised representation so can be used for similar problems and a wide range of inputs What must occur to combat the fact that many different algorithms can solve the same problem? - Answer Algorithms must be compared too determine which is most suitable by looking at the best and worst case scenarios for both types of complexity What are the two complexities algorithms differ in? - Answer Algorithms differ in:
Which greek letter denotes average case? - Answer Theta: Θ( ) Which letter denotes worst case? - Answer Big O: O( ) What are the 6 classes of complexity from most efficient(slowest growing) to least efficient (fastest growing) - Answer - Constant
What is the big O notation for polynomial complexity? - Answer O(n^k) [where k is a constant greater or equal to 0] What is the Big O notation for exponential complexity? - Answer O(k^n) [where K is a constant greater than 1] What can Big O can examine? - Answer Big O can examine both space (RAM) and time (CPU execution time) complexities What is constant complexity and give an example? - Answer Constant complexity is where the complexity remains constant regardless of data set size and is the most efficient. Used for simple statements (no loops) and can encompass tasks such as pushing/popping from stacks) Gives a horizontal line on a time/data set graphq What is logarithmic complexity and give an example? - Answer Logarithmic complexity involves the rate of complexity increase decreasing as the data set increases and has a good efficiency as very scalable Can be seen in divide and conquer techniques such as binary search (quick and merge sort are divide and conquer but are linearithmic) Give a log graph