Week 12 Class 22 Tue Nov 12 Posted: Nov 12
Special Announcement
We were informed today that the heating system in the building BCAS, i.e., CAS, i.e., where we have class, will be without heat:
Please communicate to your faculty, staff, and students that the building is expected to be without heat again overnight and during the morning tomorrow. Please have them prepare for cold temperatures in the building.
…The boilers were turned off overnight Tuesday - Wednesday due to an alarm condition. The HVAC and Mechanical teams have been working on the problem, but do not have a solution at this time.
As Prof. O'Neil told us:
if you’re in BCAS tomorrow dress warm.
After Class
Announcements
Project 3: Code Analysis TDD Exercise 51: Project 3 Feedback 5 Score in Brightspace, feedback in Report5.md
The code used to generate the report is the latest commit until the report's generation time. This time is typically within 30 minutes of the due date. Your score on this exercise verifies that:
And that you implemented the required minimum number of rules.
It does not reflect complexity, formatting, style, or other things that you got some feedback on previously. Follow all guidelines in the project instructions, the overall notes that I posted after each exercise, and your previous individual Project 3 exercise feedback.
std::endl
Prefer '\n'
to std::endl
. Students think that std::endl
adds a newline, i.e., that:
is equivalent to:
However it is not, as it also flushes the output buffer, i.e.,
Don't flush the output buffer unless you need to.
Redirecting an Output Stream
Testing the output of code to std::cout
(standard output) or std::cerr
(standard error) is not immediately testable
in a unit test. We need to "grab" this output and store it in a std::string
so we can verify the result. The way to do
this is to redirect the output to a string. The following program is an example of how to do that:
Class
Unless stated otherwise, all exercises are due by 3 pm on Wed Nov 13