Projects Inventory

Library Management System Gaming Project in C++

Explanation

  1. Book Class: Represents a book with attributes for the title, author, and availability status.
    • title
      Advertisement
      : The title of the book.
    • author: The author of the book.
    • isAvailable: A boolean indicating if the book is available for borrowing.
  2. Library Class: Manages a collection of books and provides functionality for adding, borrowing, returning, and listing books.
    • addBook: Adds a new book to the library with the given title and author.
    • borrowBook: Changes the status of a book to borrowed if it’s available. Displays a message if the book is not available or not found.
    • returnBook: Changes the status of a book to available if it was borrowed. Displays a message if the book was not borrowed or not found.
    • Advertisement
    • listBooks: Lists all books in the library with their availability status.
  3. Main Function:
    • Creates an instance of the Library class.
    • Adds a couple of books to the library.
    • Lists the books in the library.
    • Borrows a book and shows updated status.
    • Returns the book and shows updated status again.
Exit mobile version