Linear arrays: Difference between revisions

From Computer Science Wiki
(Created page with "right|frame|Linear arrays<ref>http://www.flaticon.com/</ref> == Identifying examples of abstraction == (awaiting permission to post material) '''Anyt...")
 
No edit summary
Line 1: Line 1:
[[file:arrows.png|right|frame|Linear arrays<ref>http://www.flaticon.com/</ref>]]
[[file:arrows.png|right|frame|Linear arrays<ref>http://www.flaticon.com/</ref>]]


There are four common algorithms we enact on an array.


* Sequential search
• Binary search
• Bubble sort
• Selection sort


== Identifying examples of abstraction ==
(awaiting permission to post material)
'''Anytime you see a simple interface covering a more complex system''', you should think "abstraction".
* A car is a very complex machine but the interface is simple (a steering wheel, a gas pedal and a gear shift)
* A video game controller only has a few buttons, but underneath the controller is complex control mechanism
* A programming language can be fairly simple, but it translates the instructions you write into machine code, which is impossibly complex
== Explain why abstraction is required ==
You must decide '''at what level should I abstract a problem and solution'''.  Abstraction is required because life is complex. We need to simplify complex systems so people can understand and use them.
For example, a student is building a software program to help students pick the right college. The student uses SAT scores to determine a good match. The student has '''abstracted''' complexity when it comes to choosing a college. There are actually many factors in choosing a college, but the student has chosen to focus on SAT scores.
== Construct an abstraction ==
I want to launch a missile, loaded with 10,000 liters of peanut butter, at my friend because it would be funny. There are hundreds of important variables associated with launching, flying, and hitting a target in this example. Please think for a moment how we could construct an abstraction.
We could create a giant red button with the words "launch peanut butter missile at friend" which would launch the missile. However once this button was pushed a VERY COMPLEX process would begin to launch the missile. In this example, the button is an abstraction of a missile launch.
== Distinguish between a real-world entity and its abstraction ==
Please refer to the missile example above.


== Do you understand this? ==
== Do you understand this? ==

Revision as of 14:17, 27 July 2017

Linear arrays[1]

There are four common algorithms we enact on an array.

  • Sequential search

• Binary search • Bubble sort • Selection sort


Do you understand this?[edit]

Standards[edit]

These standards are used from the IB Computer Science Subject Guide[2]

  • Describe the characteristics of standard algorithms on linear arrays.

References[edit]

  1. http://www.flaticon.com/
  2. IB Diploma Programme Computer science guide (first examinations 2014). Cardiff, Wales, United Kingdom: International Baccalaureate Organization. January 2012.