Exercise 6
MA407
This set of exercises will make you more familiar with the object oriented programming features
of Java. You will practise to implement APIs and design and use own data types. We start
with a simple data type implementation for a given AP
Exercise 5
MA407
This exercise set concerns sorting algorithms and their running times. It should make you
familiar with the type of questions that you will encounter in the exam. (In fact Exercise 2(a),
2(c), 2(d) appeared in a very similar form in last
Exercise 2
MA407
One subject where two dimensional arrays prove particularly useful are calculations with matrices - which has a multitude of applications, as you know. The following exercises ask you
to implement matrices and some common matrix operation
Exercise 3
MA407
This set of exercises will introduce you to a particularly ecient method to search for an entry
in a sorted array, which is called binary search. The basic idea of binary search is that the
section of the array where the entry is searched
Exercise 1
MA407
Since the times of the Ancient Greeks prime numbers have held much fascination for mathematicians. Although today we know quite a lot about them, many questions remain open
and they are still a topic under intensive study. (For example, o
Exercise 4
MA407
In this exercise we to consider a sorting strategy that is dierent from the strategies we saw
in the lecture: we want to sort by switching elements that are not in the right order. More
precisely we want to sort an array x of type int[] b