CS 381/780 Advanced Object Oriented Programming in C++
Class website: http://venus.cs.qc.edu/~waxman/780/
Professor e-mail: jerry.waxman@qc.cuny.edu
TA's: Ephraim Montag: ephraim.montag@qc.cuny.edu Office Hours: 5:15 PM-6:00 PM
          Benjamin Kusin: benjaminkusin@gmail.com         Office Hours: 5:15 PM-6:00 PM
Class Monday-Thursday 6:00 PM to 8:40 PM
Exams: Midterm has passed. Final is Wed. June 24th. 
Please bear in mind that details here may not be all inclusive and to look at the project requirements on the class website as well as any information said in class for the assignments. In addition, what appears in e-mails is also important. 

Lateness Policy: If an assignment is late the 1st day is one point. Every subsequent day is double the previous day amount of points. So day 1: 1 point , day 2: 2 points etc. In addition, once you have submitted a project and the due date passes you cannot resubmit. Only previously non-submitted projects are accepted late.
Note: No late projects will be accepted anymore. Everything is due on the date and time that it is due.

 #            Assignment Details
 1 Python See class website
 2 Debug the Queue See class website 
Look over!
 3 Evaluate the candidate! http://venus.cs.qc.edu/~waxman/780/is%20she%20right.pdf
Look Over!
 4 A Safe Matrix Due Date: Monday June 8th at 11:59 PM
  Note: Extended to Tuesday 6/9 11:59 PM

Submission to: ephraim.montag@qc.cuny.edu
1.   Write a templatized safe matrix class using the given safe array class to allow for matrix multiplication.
2.   Safe Matrix class must have at minimum the following:
   o    SafeMatrix(int dim); //dim is same number for rows and columns
  o    SafeMatrix(int row, int col);// different number of rows and columns
   o    SafeMatrix(int row_low, int row_high, int col_low, int col_high);
        //rows and columns do not start at 0-* they start at low and go to high
   o    operator*();
   o    operator=();
   o    operator<<();
   o    ~SafeMatrix();
   Make sure to include the use of [][] for the matrix as well. 
Input: Every two lines represent a matrix. The first line will represent the row and column dimension of the matrix. The second line will contain a list of integer which represents the value of the matrix.
Output: Output the original form, and the product of first matrix with second matrix for each pair of matrices.

File Name: matrix.cpp

 5  Polynomial Arithmetic - No STL Due Date: Monday June 8th at 11:59 PM 
 Note: Extended to Tuesday 6/9 11:59 PM
Submission to: benjaminkusin@gmail.com
  1. Write a polynomial class where each node on a link list represent a single term in a polynomial. 
    The class should allow basic arithmetic - addition, subtraction and multiplication with polynomials.
  2. Polynomial class must have at minimum the following:
    • Polynomial()
    • Polynomial(string equation);
    • Polynomial(const Polynomial& src);
    • operator+();
    • operator-();
    • operator*();
    • operator=();
    • operator<<();
    • ~Polynomial();

1.   Input: Each line will contain a list of integers, which taken in pairs, will represents the coefficient and exponent of each of the terms in the polynomial.

2.   Output: Output the original form, canonical form, sum, difference, and product for each pair of polynomials.

3.   Sample I/O: polynomial-in.txt   polynomial-out.txt

4.   filename: polynomial.cpp

 6 VNT Due Date: Friday June 12th at 11:59 PM
Submission to: ephraim.montag@qc.cuny.edu

1.   Write a VNT class which will contain an m x n matrix such that the entries of each row are in sorted order from left to right and entries of each column are in sorted order from top to bottom.

2.   Each VNT will start out as an empty matrix where every cell of the matrix is equal to INT_MAX. An array of integers can then be inserted and sorted using this structure. Consider this VNT structure similar to a minheap.

3.   VNT class should utilize the Matrix class, and must have at minimum the following:

o    VNT(int m, int n);

o    add(int);

§  - always add from the lowest rightmost corner and readjust VNT.

o    getMin();

§  - always remove from the most upper leftmost corner and readjust VNT.

o    sort(int k[], int size);

§  - returns sorted array by utilizing add() and getMin() functions.

o    find(int i);

4.   Each of the above functions must confine to the given time complexity. add, getMin, find must be O(m + n). sort O(n^3). Note: m*n >= size for sorting to be possible.

  1. Input:Every two lines represent a VNT. The first line will contain 3 integers representing m, n, and size respectively. The second line will contain a list of integers which represents the unsorted array.
  2. Output: Output the unsorted and sorted array (label them as such).
  3. Ensure the use of I/O to/from program via command line arguments.
  4. To be clear, take in an array run sort function on it by using add() and getMin() (in sort). In other words, use the VNT to sort the array. 
  5. filename: VNT.cpp
Sample I/O: vnt-in.txt vnt-out.txt
 7 Safe Array Uniform Initialization problem 
 8 Help Arrange the ACM Meet and Greet Pre-contest Dinner Due Date: Monday June 22nd at 11:59 PM
Submission to: benjaminkusin@gmail.com

1.   Input: No arguments loaded. Set n = 9. You do not need arguments to main.

2.   Output: Output the number of acceptable arrangements for 2 to n teams to console. You only need to output the number not the actual combinations. Hard coding the numbers in without a method of solving the problem will get you no credit.  

3.   Sample I/O: Sample unique seating arrangements for debugging purposes.


o    Case 2: 0
Case 3: 1
Case 4: 2
Case 5: 13
Case 6: 80

You must output from 2-9 (which is n in this case). Part of the project requirements is to make your program able to output 2-9 without excess delay. Full credit will not be given unless your program does so.  

Note that although the table is circular, rotating a seating pattern around it does not count as another arrangement.
In other words,
1     3
counts the same as
4     2
which is the first pattern rotated clockwise one position. Also, if reading around the table in the opposite direction as an existing solution produces the same pattern as the existing one, it doesn't count as a separate solution.

Any solution that is the same as an existing one but rotated in either direction or is the same when read around the table in the opposite direction as the existing solution doesn't count as a separate solution.

filename: acm_dinner.cpp  
 9  Inverted Index

 Due Date: Monday June 22nd at 11:59 PM
Submission to: ephraim.montag@qc.cuny.edu
  1. Input: Load the file via argument to main().
  2. Output: Output the inverted index list.
  3. Sample I/O: permuted-in.txt   permuted-out.txt
  4. Note that " " (whitespace) is not a word. 
  5. Command line arguments to main must be used. 
filename: permuted.cpp

 10 Safe Arrays and the STL assignment Due Date: Tuesday June 23rd at 11:59 PM
Submit to benjaminkusin@gmail.com