Console app: Building a Library Management System in C#
Introduction In this blog post, I will guide you through creating a simple Library Management System in C# that utilizes the concepts of encapsulation, polymorphism, and inheritance. This exercise is perfect for practicing object-oriented programming principles. Objective Create a simple Library Management System that demonstrates encapsulation, polymorphism, and inheritance. Requirements 1. Encapsulation Create a `Book` class with private properties: `Title`, `Author`, `ISBN`, and `IsAvailable`. Provide public methods to get and set these properties as needed. 2. Inheritance Create a base class `LibraryItem` with common properties such as `ID`, `Title`, and `IsAvailable`. The `Book` class should inherit from `LibraryItem`. Create another derived class `Magazine` that inherits from `LibraryItem` and has additional properties such as `IssueNumber` and `Publisher`. 3. Polymorphism Create a method `DisplayDetails` in the `LibraryItem` class that can be overridden by the der