Programming in C++

Looking back at previous courses and trying to remember the exact details of assignments can be difficult. Fortunately – or rather unfortunately – most of the content and assignments for this course have been very similar from year to year. So when I decided to write about some of the assignments from the C++ programming course I took it wasn’t too difficult to track down the requirement list and motivation for each assignment.

True to its name, this course taught programming in C++. Covered concepts included encapsulation, templates, references, constructors and destructors, overloading, memory management, exception handling, and how to use the standard template library.

Assignment #4

The fourth assignment was to develop a recipe parser which could read, write, and view recipes stored on the file system in XML format.

At the beginning of the program the user was prompted to enter in a text file to read data from. If a file did not exist then an empty file would be created and opened to allow saving of any created recipes. The main program loop would then begin and present the user with a list of choices. Among these the user could display recipes by contributor, spices, rating, or number. There were also options to list all recipes by name, enter a new recipe, save, or quit.