A1: UML Practice

A1: UML Practice #

Deadline: (updated) Jan 30, 11:59pm Eastern Time

Requirements #

Select one of the following software components/modules, and draw a UML class diagram for it. The options are in different programming languages, so you can pick the one that you are most familiar with.

For each component/module, I will point you to its source code files, and a set of primary classes that must be included in the class diagram.

Your diagram should be drawn with clarity while controlling complexity. That means:

  • For the primary classes:
    • You should also include the attributes and operations that are important for understanding the functionality of the component;
    • But exclude the attributes and operations that are trivial/routine/non-essential (such as __str__ in Python and toString in Java);
    • You can also exclude the attributes and operations that does not directly relate to other primary classes (i.e., using them as field type, return value type, or parameter type).
  • You should include the relationships between the primary classes.
  • You can include other classes and relationships in the diagram if that increases clarity (e.g., a common base class for several primary classes but not defined in the current component’s source code).
  • As long as you satisfy the other requirements, your diagram does not need to cover all the code in the source code files.
    • Hint: focus on the signatures of classes/interfaces, methods/functions, and fields; you do not need to understand the implementation details to draw a class diagram.

Please make sure to use the link on this page to access the source code files (instead of searching the names on GitHub/GitLab), so that we agree on the same version of the code.

Option 1: Kotlin okhttp3 #

Option 2: Java Guava Table #

Option 3: Python sortedcontainers #

Option 4: C++ tinyxml2 #

  • Source code file

    • tinyxml2.h
    • There is tinyxml2.cpp file under the same directory but you shouldn’t need it for drawing the class diagram.
  • Primary classes: XMLDocument, XMLElement, XMLAttribute, XMLText, XMLNode

Submission #

Your submission should be a pdf/png/jpg file containing: (1) a title with the name of the software component/module you selected, and (2) the UML class diagram. Submit to Learn > Submit > Dropbox > A1: UML Practice.