* These counters allow specific members/books/films to be automatically generated, through String concatenate operations
* There are static, so as to guarantee that successive calls to populate() won't generate identical Strings
* They represent the number of members/books/films already generated via Tools
* but depending on other actions made on the ISocialNetwork, they may differ from its actual 'numbers' of members/books/films
*/
privatestaticintnextMember=1;// next value for members (cf logins/passwords)
privatestaticintnextBook=1;// next value for books (cf title)
privatestaticintnextFilm=1;// next value for films (cf title)
/*
* These constants are String or prefix-String to be used when generating new members/books/films/reviews
*/
privatestaticfinalStringLOGIN="member";
privatestaticfinalStringPASSWORD="passwd";
privatestaticfinalStringPROFILE="profile";
privatestaticfinalStringTITLE="title";
privatestaticfinalStringKIND="kind";
privatestaticfinalStringAUTHOR="author";
privatestaticfinalintNB_PAGES=12;
privatestaticfinalStringDIRECTOR="director";
privatestaticfinalStringSCENARIST="scenarist";
privatestaticfinalintDURATION=15;
privatestaticfinalStringCOMMENT="comment";
/**
* Adds members, books, films and reviews to the ISocialNetwork, according to the following process :<br>
* 1. Adds the asked number of members, giving them pseudo-random logins/passwords<br>
* 2. Make one of the added members to add the total asked number of books, giving them pseudo-random characteristics<br>
* 3. Make one of the added members to add the total asked number of films, giving them pseudo-random characteristics<br>
* 4. Add the asked number of reviews : <br>
* - reviewed items (book/film) and reviews'authors are randomly chosen among those that were added by Tools<br>
* - depending on "chance", a member can add a review on an item that he already had reviewed, which will replace this previous review. It is therefore not guaranteed that the total number of reviews stored in the ISocialNetwork will have a nbReviews increase.<br>
* @param sn the ISocialNetwork to work with
* @param nbMembers the number of members to add to sn.
* @param nbBooks the number of books to add to sn
* @param nbFilms the number of films to add to sn
* @param nbReviews the number of reviews to add to sn
* @return meantime of each operation
* @throws java.lang.Exception whenever one of the calls to addMember(), addItemBook(), addItemFilm(), reviewItemBook() or reviewItemFilm() throws an exception, this exception is directly rethrown to the caller. That's why these methods should have been well tested before trying to use populate().