Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ngallagher committed Feb 5, 2019
1 parent c86bca0 commit 901c205
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,9 @@ types and those constructed from the script execution flow.
#### Class
A class is the most basic type. It contains variables and functions that can operate on those variables.
Once declared a type can be instantiated by calling a special function called a constructor.
Once declared a type can be instantiated by calling a special function called a constructor. There are two
primary categories of class, the abstract class and the concrete class. An abstract class represents
a generic concept and as such cannot be instantiated. Below is an example of an abstract class.
```js
abstract class Shape {
Expand Down Expand Up @@ -901,7 +903,13 @@ abstract class Shape {
}
}
}
```
A concrete class represents an whole object or entity and unlike abstract classes it can be instantiated.
To leverage methods and state from other classes inheritance is possible. Below we can see how a square
inherits state and a method from the shape class.
```js
class Square extends Shape {
private let width: Integer;
Expand Down

0 comments on commit 901c205

Please sign in to comment.