CPSC 421-010 Object-Oriented Programming (OOP) Spring 2024

Project 2 Posted: Feb 15

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

In addition to the following code changes, you will maintain two modeling diagrams. There will be a pull request to add the starting files to your repository.

The diagrams must be updated to reflect the code for each tag. So do not tag until the part below is done and any diagrams are updated.

Tag v2a Implement and close all issues I created as feedback from Project 1. When you finish fixing an issue, at least one commit must describe what you are changing. Add your calls' exact function names and (UML form of) parameters to the xml_parser for the sequence diagram. Due Feb 22 26

Tag v2b Create a namespace, xml_parser, for the functions in xml_parser. This will involve making changes to the files srcfacts.cpp, xml_parser.hpp, and xml_parser.cpp. Due Feb 26 28

From now on, do not change the files xml_parser.hpp or xml_parser.cpp.

Tag v2c Create the class XMLParser in the 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. Add the XMLParser as a participant for the sequence diagram and show how it is involved between srcFacts and xml_parser. Due Mar 4

Tag v2d 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 XML parsing variables from srcfacts.cpp as possible. Do this one field/data member at a time. For the class diagram, show the added fields and the removal of parameters. For the sequence diagram, update the parameter lists of the calls to the XMLParser. Due Mar 4

Tag v2e Inline the calls to the xml_parser free functions into your XMLParser methods. Inlining the calls does not mean adding the inline specifier, and it does not mean changing anything in XMLParser.hpp. Do this one free function call at a time. Ultimately, 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}. For the sequence diagram, remove the xml_parser participant and any calls. Due Mar 5

Ensure the project compiles, builds, and produces the correct answer at every commit with GCC and Clang.

There is a zero-tolerance policy for the following. A zero-tolerance policy means that you will receive a zero for that part if any of the following are violated: