The name of a class should represent its purpose. It must begin with a letter and it can contain letters, numbers, underscores, or hyphens. It must not contain spaces or periods. The name of the class must be the same as the name of the file with the .cls extension that contains the class definition.

For example, here are two class files—Emp.cls, which contains the definition of the Emp class that models an employee, and Dept.cls, which contains the definition of the Dept class that models a department.