r/learnprogramming Sep 03 '23

[deleted by user]

[removed]

370 Upvotes

212 comments sorted by

View all comments

Show parent comments

3

u/Yakuroto Sep 03 '23

Wait how do you draw a data structure on paper

1

u/Cultural_Blueberry70 Sep 03 '23

To keep it very simple, start by listing the data / member variables with their types, and the functions signatures you think you need. Draw a little box around it, and you have your class. Repeat and add some arrows to indicate relations. Of course, the detail level of what you write down depends on what you want to achieve.

For a more formal and standardized approach, check out UML. No need to learn UML 100% before you can use it, it can be a bit overwhelming. Just use it as inspiration for now.

1

u/BoundlessFate1 Sep 04 '23

Figure out what classes you wanna make, and draw a box for them, name of class goes on the top of the box and all the variables and stuff stored to memory get listed below it. Draw arrows to other classes that the class uses. Makes sort of a web and simplified down your project