Creating a UML Class Diagram of existing code
The way I have always created class diagrams for existing projects is first:
1. create panel (not sure if that is the right word) for each class (usually I create the abstract classes and interfaces here too)
2. Add all of the function/methods to that panel (you can choose to not include private functions, as the UML is there to show how classes interact - not necessarily to show all function a class has. But consult the person who gave you the task for this)
3. Add all properties (whether to include private stuff/class variables is a similar story as above)
4. Add the most obvious connections to this UML, including the cardinality
5. Add the less obvious stuff together by checking the code thoroughly.
Especially the last step is quite time consuming, which is why you would want to create and maintain an UML beforehand/during your project.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now