Learning code, as the stereotypical saying goes, is a lot like learning a foreign language. Programming languages have developed over time like spoken ones do and while the goal of spoken languages is to communicate verbally with other human beings, the objective of code is to program instructions. There are hundreds of programming languages, some not used anymore, some highly developed over time, that are so similar and yet so different from each other. Some of the languages are extremely extensive (C#, C++, Java, Python, etc.), whereas others were made just to have fun, known as esoteric languages (Whitespace, INTERCAL, Piet, AAAAAAAAAAAAAA!!!!, etc.). Each language contains its own set of terms and rules, however the structure of the code is the most essential part of making it work.
A way to organize code is through the use of UML. UML (Unified Modeling Language) is used to visualize the design of a system. It has various types of diagrams that can show the structure or behavior of the system. The main diagram for object-oriented programming is the class diagram. A class box represents three compartments: the top is the class name, the middle is the class attributes (objects), and the bottom is the class methods. UML uses different arrows and lines to show relationships between classes, such as if a class inherits another or if a class is dependent on another.
Many programmers working with object-oriented programming begin not with actual code, but a UML (or other) design in order to organize their code and view the overall picture of what is required to code in each class and how to connect classes. This is essential in group projects where different programmers can work on different classes that rely on each other due to knowing how their classes interact and how the different objects and methods are called.
UML is not used solely for object-oriented programming. There are various other diagrams such as the component diagram, which shows how components are wired together, the activity diagram, which shows the flow of different actions step-by-step, and the sequence diagram, which shows how objects are ordered and how they interact with each other. UML can be used by many, if not all programming languages, and it is even used outside of code (patient healthcare systems, transportation, defense, etc.) as it is meant to be general purpose.