Final Exam Posted: Apr 28
The Final Exam is in our regular classroom Final Exam: Tuesday, May 5, 5:15 - 7:15 pm.
You are responsible for the following:
- lambda functions - Be able to write code with capture and parameters
- UML - Multiplicity and the five relationships: generalization (inheritance), dependency, association, composition, and aggregation. Be able to list and briefly explain the relationships, including an UML Class Diagram. Know the proper arrows for each relationship.
- Extension points - Four implementations: A) Callbacks using lambda functions, B) Direct inheritance from a Base class, C) Inheritance from a Handler used by a Base class, D) C++ Templates. Be able to compare at least two of these approaches on a small code example, including a small UML Class Diagram (except for D).
- RAII - What it means, why it is important, how to implement
- SOLID - Know the list of principles, both abbreviations and full names
- Coupling - Definition, list of types of coupling, why decoupling is important
- API - Definition
- PIMPL - General concepts
- Dispatch - Static vs. Dynamic, Given code and output, change code to generate the proper output
- Libraries - Difference between static libraries and shared libraries (dynamic libraries)
- Extra: vtable and how it works
The exam includes various types of problems, such as short answers, definitions, comparisons, diagram drawing, and coding.
The questions are based on what I covered in class, including the book, the exercises, and the projects. If I did not cover it in class, it is not on the exam.
The following exam answers are taken from your work on the XMLFramework Project. You will not answer them on the Final Exam
- UML multiplicity, generalization (inheritance), composition, and aggregation. Know the syntax of the diagrams for each. Given code, state the relationship, and draw a UML diagram.
- Design Patterns - general concepts, specific patterns: Template Method, Factory Method, Composite, Command, Adapter, Facade, Singleton.
- exception handling Given exception handling code, show the result. Add exception handling to a code example.
- Software Architecture - Given a problem, compare and contrast solutions using these two architectures.
- C++ Inheritance specifiers: override and final
- C++ Constructor Specifiers: explicit, mutable, default, delete
XMLFramework Project Posted: Apr 23
The project is critical to your overall grade in the course, and parts of it count toward 25% of the questions on the Final Exam. Consider this the take-home part of the Final Exam. No matter how you performed on the previous projects, you need to work on this project.
The project is due by 11:59:59 pm on Friday, May 8. The project consists of the following:
- Parsing XML with a variety of push and pull parsers
- XPath evaluation - XPath is an addressing language for XML
- XSLT transformation - XSLT is a transformation language for XML
- Combining these operations as needed by the applications
The open-layered architecture framework, XMLFramework, supports all of this and includes:
- Apps
- Applications using the XMLFramework
- xmlpipeline.cpp - CLI for using the framework
- XMLFramework
- XMLToolkit
- Set of C++ classes for processing XML
- Used to implement XMLFramework, but can be used directly
- Where your XMLParser lives (if you add it)
- XMLLibrary
- Set of C functions for processing XML
- Used to implement the XMLToolkit, but can be used directly
There is already a lot of code in the project. The primary task is to finish the remaining @TODOs. Some examples are:
All @TODOs are worth the same. You are required to implement all but 6 of the @TODOs. Any more @TODOs after that count as extra credit. As a result, you are not required to integrate your XMLParser into the framework.
The work involved is:
- (50%) Complete any
@TODOs. Each completion of a @TODO must be in a separate commit.
- (20%) Fill in all classes
@pattern and @role comments. A class can participate in multiple roles in multiple patterns.
- (10%) Document the use of design patterns in the markdown file DESIGN.md. Each instance of a design pattern in XMLFramework must be listed, including the collaborators.
- (10%) Document the architectures used in the XMLFramework in the markdown file ARCHITECTURE.md
- (10%) Draw a UML diagram of the entire project in the file UML.pdf
Notes:
- The GitHub Classroom invitation link is on Brightspace.
- The answers to some questions on the Final Exam are from your work on this project. For example, instead of creating a UML diagram during the Final Exam, your UML diagram from this project is your Final Exam answer. You must do these parts as they also count toward the Final Exam.
- The project has a complete CMake build. You can add files to the subdirectories, and the CMake build will handle them automatically. Each file in the apps directory is assumed to be a single executable. If you add files, make sure you also commit and push them to GitHub. Always verify on GitHub that the correct files are there.
- In XMLFramework, the app, xmlpipeline, uses CLI11 for parsing command-line options. When you run cmake, the file is downloaded.
- To quickly find code,
git grep works well. For all the lines of code that contain @TODO, enter the command git grep "@TODO" in the project's top directory. To see only the filenames, git grep -l "@TODO". The command depends on the directory where you run it; e.g., if you run it in the framework directory, the results are from that directory and its subdirectories. To view an overall report of which @TODOs are left, use the build target: make todo entered in the build directory.