Week 12 Class 21 Tue Apr 01 Posted: Apr 01
After Class
Square Brackets
Some of you are having issues with showing multiplicity in your yuml class diagrams. I showed multiple examples of this in class, but forgot how I got it originally working. First take a look at this diagram and the corresponding yuml input and note the square brackets for multiplicity:
The square brackets around the entire class are not the same as the multiplicity brackets, as the multiplicity brackets:
[
' bracket and to the right of the ']
' bracket. That is not a space next to them. It is part of the character.These are called fullwidth square brackets. That is where I originally got them from.
So how do you use them? You can copy them from the examples above and paste them in. The hex unicode for regular brackets are U+005B
and U+005D
, and for the fullwidth brackets U+FF3B
and U+FF3D
.
Announcements
Midterm Exam The Midterm Exam scores and feedback are in Brightspace.
Project 2
I found two issues that I created were incorrect. They both involved a blank line after the filename in a header comment.
I added the label false positive to the issue in GitHub. I considered deleting the issue, but that would lose the history, including your comments.
For the score, if you did v2c, I added a point to your v2c score and your overall score. Each issue was worth 0.5 points.
CPSC 480 Software Engineering (SE)
I also cover the SE course, which is offered in Fall, 2025. It will not be offered in Spring, 2026.
std::string_view
IN Parameters Pass std::string_view
by value instead of const reference
Coding Standard - std::string_view
Make sure to fix this in Project 3.
I expect you to follow this guideline for Project 3.
If you really don't like passing a long list of inline lambdas, the problem is not the lambda's but the long list. Consider using register
methods
BTW, whenever you do use a named lambda, use auto
for the type. Declaring a type for a named lambda is quite tricky to figure out. Using a std::function
for the local variable is not necessary.
Agenda
Exercise 62: Static Dispatch
The repository Base has a set of various method call situations, and a way at run time (using assert()
) to verify which method is actually called. Each assertion needs to have one of the following done:
assert()
in the code that indicates (via a string) which method is called, e.g., for m1()
is it "Base::m1()"
, "Derived::m1()"
, or "DerivedDerived::m1()"
?If the call is performed using dynamic dispatch then do not fill in the answer for the call, but instead comment out the assert()
, e.g.,
Handle each assertion one at a time in order, compiling and running the program (i.e., make run
) after each assertion is completed. The assertion you edited should pass, and you should be onto the next assertion.
You are required to separately commit for each block of statements in the main program.
The GitHub Classroom Invitation Link for Base is in Brightspace.
Unless otherwise noted, exercises are due by 4:30 pm on Wed Apr 02