Week 12 Class 18 Tue Mar 31 Posted: Mar 31
After Class
Announcements
Square Brackets in UML 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 separate space next to them. It is part of the bracket character.These are called fullwidth square brackets. 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.
Agenda
Exercise 64: Names The UML Class Diagram shows the class Name with attributes that are single-value optionals.
Convert the class Name in the source code to use std::optional<std:string> instead of the pair of std::string and a boolean flag. The link for GitHub Classroom is in Brightspace.
Due by 3:30 pm on Fri, Apr 3.
Reminder The type String in a UML Class Diagram does not necesarily map to a std::string in a C++ program. It could map to a std::string_view, an optional std::string, or even a c-string. Which source-code type a UML type maps to is part of the code implementation, and not part of the model.
Unless otherwise noted, exercises are due by 3:30 pm on Wed Apr 01