![]() LibraryName = LibName //enter a string value to mutate the library name Public void changeLibraryName(String LibName) Return books.size() //returns an integer number of how many books are in the arrayList * Return the number of books currently registered in this Library. Return members.size() //returns an integer number of how many members are in the arrayList * Return the number of members currently enrolled in this Library. ("The Library currently does not have space for new books.") Public void addBook(String bookAuthor, String bookTitle, int bookRef, String bookGenre) ("The Library is not currently taking new members as we are full, please enroll at a different library.") ![]() if the member capacity has been reached Public void addMember(String fullName, String telephoneNumber) OpeningTimes = "Open Monday - Friday (8am-7pm)" Public Library(int maxNumberOfMembers, int maxNumberOfBooks)Īddress = "110-119 Le Mans Cresent Bolton BL1 1SE" * Create a Library with an option to input a maximum number of members & books. books genre to be written as a string ("" "") books reference number to be written as a whole integer number books title to be written as a string ("" "") books author to be written as a string ("" "") members contact number to be written as a string ("" "") ![]() the memebers fullname to be written as a string ("" "") the member ID to be written as a whole integer number opening times of library to be written as a string ("" "") address of library to be written as a string ("" "") name of library to be written as a string ("" "") * the library name, address and members of the library, as well as the libraries opening times. * The library class represents an enrolment list for a library. Here's my code if anyone feel they want to look i apologise if its not set out right but this is the first time i've ever posted on a forum: import java.util.* OK so i'm doing a project in java using bluej, I've been tasked to write a library system, i'm having an issue as to how, when i create a new member or book within the library class, can i add it to my array-list upon creation? it's probably something really simple but i just cant figure it out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |