Project 2

Continue to improve the design of srcFacts using more language features. For this project, there are no changes to the functionality, only to the design.

Tag “v2a” Implement and close all issues from Project 1. When you finish fixing an issue, create a tag for that commit in the form issueN tag where N is the issue number, e.g., when you complete issue1, create the tag issue1. Due Mar 1.

From this point on, do not make any changes to the files xml_parser.hpp or xml_parser.cpp.

Tag “v2b” Create the class XMLParser in files XMLParser.hpp and XMLParser.cpp where the methods call the free functions from xml_parser.hpp. Do not use any fields/data members. The method parameters must be identical to the parameters of the free functions in xml_parser.{hpp,cpp}.

Tag “‘v2c’” Eliminate any parameters in the XMLParser methods that you can, replacing them with field/data members in the class. In other words, move as many of the XML parsing variables from srcFacts.cpp as you can. Do this one field/data member at a time.

Tag “v2d” Inline the calls to the xml_parser free functions into your XMLParser methods. Inlining the calls does not mean adding the inline specifier. Do this one free function call at a time. At the end, your XMLParser.cpp should have no calls to xml_parser functions, and will not need to include xml_parser.hpp. Do not make any changes to the files xml_parser.{hpp,cpp}.

Tag “v2e” Use inversion of control on the while loop/nested-if in srcFacts so that the entire loop is inside of XMLParser.

Unless state otherwise, all parts of Project 2 are Due Mar 8.

At every commit, make sure the project compiles, builds, and produces the correct answer.