There will be one programing question and a few short answer questions on C++. The programing question will be in an enviroment identical to the PotDs. It will require programming complete and correct C++ programs. Partial credit will only be given for working, compilable code that passes some test cases. Code that doesnt compile will not receive any credit. Multiple (but not unlimited) submissions will be allowed.
We have also decided to simplify the exam. We had originally been designing the exam with the mistaken belief that it was happening all after mp_stickers was due. Since that is not the case we have simplified the exam. You will instead be programming a small function that will work on a class we are providing you. You can find the header below. You will be asked to write a small function that will take a Matrix by reference and return a Matrix.
Once again I personally apologize about the issues with this exam. It is my fault and I will make sure it will not happen again. Thank you for your understanding.
G Carl Evans
—begin matrix.h—
#pragma once
namespace exam {
class Matrix {
public:
Matrix();
Matrix(int rows, int columns);
Matrix(const Matrix &m);
Matrix & operator=(const Matrix &m);
~Matrix();
int get_coord(int rows, int columns) const;
void set_coord(int rows, int columns, int i);
int get_num_rows() const;
int get_num_columns() const;
void display();
private:
int *data_;
int num_rows_;
int num_columns_;
void _destroy();
void _copy(const Matrix & m);
};
}
—end matrix.h—
The programing question will give you a class that is similar to Image
from mp_stickers
with one method unimplemented. You will be asked to implement that method. Possible methods would be.
You will not have to resize the image or change its aspect ratio.
Cube
is part of the cs225
namespace)cs225::Cube
)Assignments referenced:
Points:60
Start: Sunday, September 11
End: Tuesday, September 13