public static void Main()
Continue with the development a simple library management system. The system currently
allows the user to add a book (see Figure 1) and view all books in the library (see Figure 2).
You have also changed the the system to a menu-driven console application (see Figure 1).
Complete the development of the library management system by adding functionalities to allow
a user to borrow a book and return a book.
Step 1: Code comprehension.
1.1. View and familiarise yourself with the code in the class and Main().
Step 2: Add features (create custom static methods).
2.1. Develop a method named BorrowBook. This method does not return anything and accepts
the title of a book. If the list of book titles contains the title entered, proceed with borrowing
the book, otherwise display a message indicating that the book could not be found.
• To borrow a book, use a for loop to iterate through the list of books provided the
total number of books is not exceed. If the book title at the current index of the
book titles array matches the title entered, check if the book is available. If the
book is available, change its availability to indicate that it has been borrowed and
display a message. If the book is not available, display a message indicating that
the book has already been borrowed.
2.2. Develop a method named ReturnBook. This method does not return anything and accepts
the title of a book. If the list of book titles contains the title entered, proceed with the return
process, otherwise display a message indicating that the book could not be found.
• To return a book, use a for loop to iterate through the list of books provided the
total number of books is not exceed. If the book title at the current index of the
book titles array matches the title entered, check if the book has already been
borrowed. If the book has been borrowed, change its availability to indicate that
it has been returned and display a message. If the book is available, display a
message indicating that the book has not been borrowed and is still available.