► |  | How to Design Classes Languages

1 | Professor J Beginner
2 | Professor J Intermediate
3 | Professor J Intermediate + Access
4 | Professor J Advanced
| Index

▼ | 3 | Professor J Intermediate + Access

3.1 | import
3.2 | class
3.3 | interface
3.4 | Modifiers
3.5 | Field
3.6 | Method
3.7 | Constructor
3.8 | Statement
3.9 | Expression

Version: 4.1.4
top← prev up next →

#### 3.2`` class

- class Id {Member ...}

  Creates a class named Id. If no constructor is present, one is generated that takes no arguments.

- class Id implements Id ,Id ... {Member ...}

  Creates a class named Id that implements the listed interfaces named by (scheme implements). If no constructor is present, one is generated that takes no arguments. Any method defined by the listed interface must be a member of this class.

- class Id extends Id {Member ...}

  Creates a class named Id that inherits and expands the behavior of the extended class. If no constructor is present, one is generated that takes no arguments. If the parent class contains a constructor that requires arguments, then none can be generated and the current class must contain a constructor that contains super.

- class Id extends Id implements Id ,Id ... {Member ...}

  Creates a class named Id that inherits from the extended class and implements the listed interfaces.

- abstract class Id {Member ...}

  Creates a class named Id that cannot be instantiated. Members may contain abstract methods. Non-abstract classes extending this class are required to implement all abstract methods.

- abstract class Id implements Id ,Id ... {Member ...}

  Creates an abstract class named Id that implements the listed interfaces. Members can include abstract methods. This class need not implement all methods in the interfaces, but all non-abstract subclasses must.

- abstract class Id extends Id {Member ...}

  Creates an abstract class named Id that inherits from the extended class. Members can include abstract methods. If the parent is abstract, the current class does not need to implement all inherited abstract methods, but all non-abstract subclasses must.

- abstract class Id extends Id implements Id ,Id ... {Member ...}

  Creates an abstract class named Id, that inherits from the extended class and implements the listed interfaces.

top← prev up next →