If you have experience with object-oriented programming, you'll find much of D's OOP support familiar. As such, I need to reiterate my warning from before: D is not C++, Java, or C#. Familiarity can help you pick some things up more quickly, but it can also lead you to take other things for granted. This section introduces D's OOP features.
There are four levels of protection in D:
protected. The first three apply to classes, structs, and modules, but
protected only has meaning with classes. We'll examine it later when we talk about inheritance.
public in a module, whether it's in module scope or as part of a
struct declaration, ...