Solutions to all 5 problems of the third lab test are available below. Although there are many different ways of solving these problems, it is important that you make use of available APIs, and do not implement functionalities already provided by them.

For example, in the third lab test, almost all sections had to deal with a problem that involved some sorting of objects. Java API provides various functionalities for sorting. For example, many classes such as TreeSet always maintain a sorted set. Furthermore, Java provides the Collections API which can be used to sort Lists (such as ArrayLists, etc). You should make use of these (and other) APIs to solve the problems (on tests and real world).

The emphasis on these solutions is the use of APIs. None of the solutions involve any implementation of code that is beyond if-else statements and for loops. Everything else is handled by various APIs.

If you have any comments, or find any errors, please email me (myFirstName@cse.yorku.ca).

The problems are here.

F1.java
R7.java
T1.java
W5.java
W7.java