Week 14 Class 22 Tue Apr 14 Posted: Apr 14
Announcements
Exercise 73: Dynamic Dispatch
Feedback is in the file oracle.dynamic.txt in the branch feedback in your repository. This is the difference between the oracle (with the correct answers) and your Base.cpp. If it is empty, then that means your answer is completely correct (reflected in your score). Even if your answer is correct, the file may show some differences.
There is a strong possibility that this will be in a question on the Final Exam.
Exercise 76: FileIO
Please read over the feedback in Brightspace. Even if you got a 10 points, there may be feedback as to your comments or coding style.
Do not use the term // virtual ... for a comment of a method (or destructor). The keyword virtual tells us that. The following are examples of substandard comments for destructors:
Exercise 81: Software Development Habits Survey This is an optional exercise that involves taking an outside survey. The survey involves making changes to code in a browser-based editor. See the Brightspace anouncement for more information, and how to get a screenshot to prove your survey completion.
Upload the screenshot to Brightspace. Due by Noon on Fri, Apr 17.
Examples and Coding Style
We started looking at code that involves multiple classes. To more clearly show the relationships between classes, e.g., two classes involved in a design pattern or classes that inherit from one another, we will often include the definitions of constructors, methods, and destructors directly in the class, rather than in a separate declaration file (i.e., .hpp) and a definition file (i.e., .cpp). However, for any code in a project, you must still follow our established rules:
Failure to follow this will result in a penalty, except in very specific approved cases.
Agenda
Use the GitHub Classroom Exceptions invitation link in Brightspace.
Take the code and perform the following changes, each in a separate commit:
Run the program once without an exception being thrown. Then, run the program once for each exception, and show that the exception is thrown. Note that there are instructions for building, BUILD.md. You can also install the program encoder (see INSTALL.md). Once installed, you can run encoder from any directory. Note that if you rebuild, you will need to reinstall. See README.md for how to run.
To demonstrate this, record a terminal session using asciinema. Submit the terminal session using the form in the exercise title. You can use GitHub Codespaces for this as it has asciinema installed.
Note that both parts, the commits and the asciinema session, must be completed to receive any points.
Exercise 85: Design Pattern Factory Method Quiz
Complete the quiz. Any incorrect answer is a point off out of 10, so answer very carefully.
You will see the correct responses after the due date.
Unless otherwise noted, exercises are due by 3:30 pm on Wed Apr 15