STL

The assignment files can be downloaded from below.
assignment1.c contains the implementation of the last program we discussed in class. assignment1.in contains a sample input to the program, and assignment1.out contains the output that is generated when executing assignment1 and passing assignment1.in as an input.

To execute the assignment, please login to your ecf and type the following commands:

mkdir ece055
cd ece055
wget http://individual.utoronto.ca/samihaija/teachings/prac.0910/assignment1.cc
wget http://individual.utoronto.ca/samihaija/teachings/prac.0910/assignment1.in
wget http://individual.utoronto.ca/samihaija/teachings/prac.0910/assignment1.out

g++ assignment1.cc -o assignment1

To run the compiled output using assignment1.in:

./assignment1 < assignment1.in

In order to complete this assignment, you need to complete one of the 3 alternatives.

Alternative 1: using iterators

Switch the for-loop implementation in the code to use iterators.

Sorting **Not fully taught yet

Print the all the departments, in ascending order of how many courses they offer.

Different program

Instead, implement a "sort" program: A program that takes a list of numbers from the user, then prints the numbers in sorted order.

Files