Checking Your Prerequisite Knowledge

Following are some questions that will help you to assess whether or not you have the expected prerequisite knowledge for MTH517. You should be able to answer the questions easily, and completely. If you are able to answer the questions, it is likely (but not necessarily the case) that you have adequate prerequisite knowledge for MTH517.
  1. Write a C++ program that:
  2. Write a C++ class to implement complex numbers, including member functions to input, output, add, and multiply.
  3. Write a C++ class to implement a square matrix, including member functions to input, output, add, multiply, and transpose. Write a simple driver program to test the class.
  4. Write a C++ class to implement a linked list, including member functions to output, add a node a node at the start or end of the list, add a node before or after a specified node, delete a specified node.
  5. Write a C++ program that reads in words from a file and stores the words in alphabetical order in a linked list, with each node holding the word and a count of the number of occurences of the word. The file name is supplied as a command line argument, and when the file has been read, the words and their occurrence counts are output.
  6. Trace (using pen and paper) the execution of a sort algorithm (choose one you are familiar with) on an array, showing the contents of the array each time it changes.
  7. Write an algorithm for a game of football or baseball. You may assume that each play has one of a finite number of outcomes, e.g., for football, possible outcomes are: a gain of N yards, sack, incomplete, etc.