Assignment 4
Due Wednesday of Week 5.
In this assignment, you will take your Assignment 3 solution and convert it to C++ using good C++ design and implementation practices. More specifically, you will follow these requirements:
- (30) Functionality in one or more well-defined classes.
- (10) Create separate header and source files. The main function should be in its own source file.
- (10) Create a Makefile, make sure to use the
-std=c++14 -g
compiler flags - (15) Input and output should use C++ streams (no C I/O functions)
- (15) Dynamic memory allocation/deallocation with new/delete (no malloc).
- (10) Test on ix-dev and include a sample output session (copy-paste into a file named
othello.log
and/orreversi.log
depending on which game variant you picked. - (10) Good Git use practices -- regular commits of incremental changes over the assignment period (the easiest way to get full points is to commit/push any time you need to stop working on the assignment, no matter how briefly). If you only have commits from the due date, you will get 0 points.
- No global variables or functions (5 points deducted for each global variable or function except
main
)
Depending on how you organized your C implementation, this may be a relatively minor revision or a more major rewrite. At any point, feel free to commit your code and ask for feedback on your design. If your questions contain high-level design issues and small snippets of code only, feel free to ask them publicly if you wish.
Some helpful references:
- Basic C++ I/O
- Dynamic memory management: TICPP v1, Chapter 13.
What to submit:
All required header and source files, a working Makefile, and the othello.log
and/or reversi.log
file(s) showing an example run on ix-dev.