Format active object README.md to display correctly on the web site

This commit is contained in:
Ilkka Seppälä 2021-03-14 16:26:24 +02:00
parent 74abc7a0d6
commit 77ffae5ecc
No known key found for this signature in database
GPG Key ID: 31B7C8F5CC412ECB

View File

@ -79,12 +79,12 @@ public abstract class ActiveCreature{
return this.name; return this.name;
} }
} }
``` ```
We can see that any class that will extend the ActiveCreature class will have its own thread of control to execute and invocate methods. We can see that any class that will extend the ActiveCreature class will have its own thread of control to execute and invocate methods.
For example, the Orc class: For example, the Orc class:
```java ```java
public class Orc extends ActiveCreature { public class Orc extends ActiveCreature {
@ -96,6 +96,7 @@ public class Orc extends ActiveCreature {
``` ```
Now, we can create multiple creatures such as Orcs, tell them to eat and roam and they will execute it on their own thread of control: Now, we can create multiple creatures such as Orcs, tell them to eat and roam and they will execute it on their own thread of control:
```java ```java
public static void main(String[] args) { public static void main(String[] args) {
var app = new App(); var app = new App();
@ -121,4 +122,4 @@ Now, we can create multiple creatures such as Orcs, tell them to eat and roam an
## Class diagram ## Class diagram
![alt text](./etc/active-object.urm.png "Active Object class diagram") ![alt text](./etc/active-object.urm.PNG "Active Object class diagram")