Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Problem Statement: Library Catalog Implementation

You are tasked with creating a library catalog system. Design a class Book to represent a book with properties like Title, Author, ISBN, and NumberOfCopies. Then, create a class LibraryCatalog that contains a list of books and provides functionality to perform the following operations:

  1. Add a new book to the catalog.
  2. Remove a book from the catalog.
  3. Display the list of available books.
  4. Search for a book by title and display its details.
  5. Check out a book, reducing the number of available copies.

Requirements:

Book Class:

  • Title (string): the title of the book.
  • Author (string): the author of the book.
  • ISBN (string): the unique identifier of the book.
  • NumberOfCopies (int): the total number of available copies of the book.

LibraryCatalog Class:

  • void AddBook(Book book): adds a book to the catalog.
  • void RemoveBook(string isbn): removes a book from the catalog based on its ISBN.
  • void DisplayAvailableBooks(): displays the list of available books with their titles and authors.
  • void SearchBook(string title): searches for a book by title and displays its details (title, author, ISBN, number of available copies).
  • void CheckOutBook(string isbn): reduces the number of available copies of a book when checked out.

Constraints:

  • The ISBN is a unique identifier for each book.
  • The number of available copies of a book should never be negative.
  • Assume that the library catalog will contain a moderate number of books (up to a few thousand).

Note:

You can encourage the use of OOP principles such as encapsulation, inheritance, and polymorphism in the solution. The candidate should demonstrate their understanding of creating classes, objects, and methods in C# and how to use them to solve the given problem.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages