Saturday, January 21, 2017
Template classes
Today, I finished my first template class in C++. Our requirement for an assignment was to write a list class to be used in future projects. This was a big challenge and something new to me. In the end, what helped out the most, was first creating the class for a primitive type int and then creating a template that accepted any type. This project was also my first time using unit tests in C++. I had only ever performed JUnit tests in Java so I was unaware of where to begin. It turned out to surprisingly be easier than I thought. However, one must write a ton of code to make sure all of the bases are covered when unit testing. It was cool to get back into testing since it has been a while. More great things to come!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment