An example of abstraction is dashboard procedures. This is because they don't contain any unnecessary features specific to any elements within it
What are the 4 pillars of computational thinking?
Abstraction
Pattern recognition
Decomposition
Algorithms
Algorithms are a set of instructions that are used to complete a task/solve a problem
Decomposition is breaking down problems into smaller easier to solve problems
Pattern recognition is seeing trends and using them to classify items based on the trends of the patterns
Pattern recognition allows for classes, function, and even variables to be used to optimise a program by simplifying it
The combining problems in bottom-up programming is called integration
Concepts in top-down programming are?
split into smaller ones
Concepts in bottom-up programming are?
Merged into larger ones
What is done with redundancy in top-down programming?
Stored
Redundancy is often created during bottom-up programming as a result of specific detail in functions, etc. Therefore it is best practice to?
eliminate redundant parts
What programming languages is top-down programming best for?
Structured
What programming languages is bottom-up programming best for?
Object oriented
What are the main features of top-down programming?
Easier debugging
Easy testing due to documentation
integrating into other systems is easy
Modularization aims to break down problems into different modules.
Each module in modularization should provide a solution to a smaller problem that fixes the larger problem
Programming with modularisation allows troubleshooting to be done quickly as a smaller part is easier to access
Decomposition 2 advantages:
Allows for easy collaboration as different individuals can work on their own section.
Debugging is easier as each part is already split into subtasks
Decomposition 2 disadvantages:
The solutions to the sub-problem may not interact as expected
Without fullyunderstanding the initial problem decomposition is very difficult
4 steps of decomposition as 2 words max per:
Identify problems
Decompose problems
Describe sub tasks
Collaborate properly
Decomposition - identify problems:
Identify problems and describe them with sector specific technical terms
Decomposition - decompose problems:
3 main parts:
Understand problem fully
Each section should be at an equallevel of complexity (detail)
Each section should be decomposed as much as possible
Decomposition - describe sub tasks:
Documentation should be created that desribes each sub-task, such that a third party could implement a solution
Decomposition - Collaborate properly:
Communication will be essential, and each person must take responsibility for their own code. These sections should then compose a final product
Once a problem has been decomposed into smaller tasks, it is often easier to identifypatterns.
5 steps of using pattern recognition in 3 words or less:
Common elements
Common differences
Elements in pattern
Describe pattern
Predict with patterns
Pattern recognition - Common elements:
Common elements may indicate a pattern, and are often easy to spot
An example of PROBLEM DOMAIN is if you were creating a program that would tell the user the required dosage of a drug. You would have to use and understand what?
Proper terminology
A module is a seperate file usually with it's own processes and functions. These processes and functions have a similar purpose, usually related to the module
What kind of approach is this?
modularisation
What kind of approach can decomposition be used for?
All
general detail vs specific detail:
Specific detail is the intricacies of how an abstraction layer works, and is therefore within the layer.
General detail ignores everything within an abstraction layer, simplifying the program
Structured programming will often involve the use of modularization, as structured programming is primarily about using procedures etc instead of direct pointers to other lines of code
List two advantages of structured programming:
Large problems can be broken down into easier to manage and program sections.
Frequently used modules can be saved and reused.
Having frequently used modules able to be saved and reused saves time and reduces bugs. As they wil be consistent and don't have to be written every time
Having large problems be able to be broken down through structured programming helps with acting as a team, as everyone can handle a different part. This allows more organised work, with individual roles allowing people to excel in certain areas. This makes work easier to complete, and team members more satisfied
Additionally structured programming makes debugging easier. The part with issues is easier to identify. Therefore, a bug can be fixed quickly and with minimal collateral damage to the rest of a program.
Algorithms should?
Alwaysterminate
Handle invalidinputs
Be efficient
Be understandable
Top-down programming is when you first design high-levelalgorithms and components, such as a dashboard
Bottom-up programming is when you start by designing and implementing specific details or functionalities of a program, such as a calculation for interest