public abstract class User
extends java.lang.Object
PostOffice
have to extends this classModifier and Type | Field and Description |
---|---|
private java.lang.String |
name
User name
|
Constructor and Description |
---|
User(java.lang.String name)
Create a new instance of User
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
User name
|
abstract void |
receiveMessage(Message message)
Call when user receive a message.
|
public User(java.lang.String name)
name
- User namepublic final java.lang.String getName()
public abstract void receiveMessage(Message message)
message
- Received message