# Introducing Another Object Orientation System

As an example for this post consider the class Directory. defineClass is used to define a new class. If you want a field or method to be private, i.e. not easily accessible from the client, you can use the function  private. The class definition is a R-expression; every assignment in that expression will define a field or method.
The class Directory is basically a S4 class and inherits from environment. You can only access public member; and the return value of defineClass is the constructor function, so you can use Directory() to create an instance of Directory. Arguments to the constructor are passed on to the init method if you have defined one. The class inherits from Show which means that the member function show is used as show-method, and Binary allows to define binary operators. On initialization a directory is created if it doesn’t exist. We start with a directory named ‘foo’.