DCS100

ODL115

Dr Paul Curzon

Learning Outcomes

Reading

Programming Exercises

Other Exercises

Week 11: Sort Algorithms and Matrices... Resources and Activities

Learning Outcomes

By the end of the week, after completing the reading and exercises, you should be able to:
  • explain several different ways to sort arrays of data into order
  • write programs to sort arrays
  • write programs containing matrices
  • explain how to declare and use matrices

The Lecture Slides

The slides will be available from the link below once released.

Reading

You should read this week:
  • Chapter 14 of Computing without Computers
  • Chapter 7 and 8 of Brinch Hansen (1999) Programming for Everyone in Java.
  • The Lecture Slides and your own notes.

Example Programs and Programming Exercises

  • Example Programs (Downloaded them, compile them, run them, work out how they work, do what if "experiments" such as "what if I add another copy of that line?". Predict what will happen then try it and see if you are right. If you have no idea, try it, then work out why it had the effect you saw.)
  • non-assessed programming exercises (exercises based on week 11 learning outcomes)
  • Once confident with the above exercises work on the assessed programming exercises.
    You should be able to do up to short assessed programming exercise 7 and mini-project level 7 now.. Note that the program tutors will only mark at most 2 programs in the final week.

Other Exercises

    Sort Algorithms: The Turing Gallery of Algorithmic Art

    Visit the online Turing Gallery of Algorithmic Art. It contains "works" depicting sort algorithms (towards the end). Compare the picture with your knowledge of the algorithm. Look at the pictures. Work out in what way the picture is depicting the algorithm. The pictures are "abstractions" of the algorithms. That means they just show some part of the story. What aspects of the algorithm are not shown? Read the explanations below the picture and compare them with your understanding. Draw your own abstract picture of bubble sort and insertion sort that show some aspect of the algorithm.