|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines an Author by defining the necessary functions it should support. The AuthorPublications. The minimal attributes of an Publication are :
Author belongs to which has an equivalent TopicInterface representation Authors should also support an identification tag that the AuthorDatabase provides to enable other classes to distinguish between different authors. Author should deactivate automatically when his age exceeds the maximum_age specified. The Author keeps track of his age using the yearEndNotification()
AuthorDatabase,
Topic| Method Summary | |
void |
deactivate()
Deactivates the Author explicitly which stops him/her from producing any more publications. |
boolean |
equals(Author authorInterface)
Tests whether the current Author is the same as the specified one. |
int |
getId()
Returns the unique identifier assigned by the AuthorDatabaseInterface of the Author as an integer |
Topic |
getTopic()
Returns the Topic of the Author |
void |
initialize(int id,
Topic topic)
Initializes the Author with the specified identifier and Topic. |
void |
initialize(int id,
Topic topic,
int maximumAge)
Initializes the Author with the specified identifier, Topic and the maximum age. |
boolean |
isActive()
Tests whether the Author is active |
void |
yearEndNotification()
Asks the Author to note the end of year. |
| Method Detail |
public void initialize(int id,
Topic topic)
Author with the specified identifier and Topic. Either of the initialization methods should be called before calling any other method of the Author.
id - Specifies the unique identifier of the authortopic - Specifies the topic of the author
public void initialize(int id,
Topic topic,
int maximumAge)
Author with the specified identifier, Topic and the maximum age. Either of the initialization methods should be called before calling any other method of the Author.
id - Specifies the unique identifier of the authortopic - Specifies the topic of the authormaximumAge - Specifies the maximum age of the authorpublic int getId()
AuthorDatabaseInterface of the Author as an integer
public Topic getTopic()
Topic of the Author
public boolean equals(Author authorInterface)
Author is the same as the specified one. This test should be based on the identification tag that the AuthorDatabase has assigned to both the Authors.
authorInterface - Specifies the author to be equated against
public boolean isActive()
Author is active
public void deactivate()
Author explicitly which stops him/her from producing any more publications.
public void yearEndNotification()
Author to note the end of year. The Author needs to update his/her age to reflect the fact.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||