Posted on: 15/11/2017
Updated on: 16/04/2018
Task done/total: --/--
This course focuses on OO-Programming, debugging, testing, coding standards and practices, memory optimization and software design principles in C++.
By attending the lectures, I understand more deeply about different data structures and the underlying implementation. I also learnt about algorithms and problem solving strategies that can be used to implement custom data structures for some specific purposes. In the labs, with the instruction of the tutor, I focused on analysing a variety of code snippets to find good and bad coding practices, then applying the findings in writting code solutions for the tutorial tasks. Besides, by doing the assignments, I understand even better about the real performance of each type of data structures in various situations of data types and sizes. The performance was measured not only by timing the program with a lot of data inputs, but also by profiling the program using Valgrind
to visualize the method-call hierarchy which aids in identifing any memory leaks or optimizing the implementation of data structures and algorithms.
Assignment 1: Write a program to analyse binary text files to conduct the required statistics on different data structure implementations as below:
std::list
, std::vector
, std::set
(including multiset
), custom list and custom binary tree
implementations..dat
to store all data in memory using a data structure given through command-line arguments. The binary file sizes range from 10KiB to 5MiB (or from ~200 words to ~1 Millions of words)..txt
to store all words in the same data structure as above (~200 words).makefile
to compile each object file separately, then link them together.Assignment 2: Design and implement a command-line game called English Draught using Object Oriented C++ Programming. Student can do this assignment in pair, but I went solo. A start-up code was given but students were allowed to go with their own designs provided that the design follows MVC pattern. Therefore I designed my own program using MVC pattern in combination with Action Dispatcher and Facade patterns. The requirements included correct uses of Interfaces, Inheritance, Exception Handling, Operator Overloading and correct implementation of all game rules, then write a makefile
and a report that reflects the design structure and the evaluation of the game. I was also profiling the program using Valgrind
to fix all memory leaks and codes with low performance. Therefore my program ran effectively and satisfied all of the game rules from start to end of a gameplay. For detailed reading of this assignment, please find in the attachments section.