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:
- Add a new book to the catalog.
- Remove a book from the catalog.
- Display the list of available books.
- Search for a book by title and display its details.
- Check out a book, reducing the number of available copies.
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.
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.
- 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).
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.