private string branch_name;
public string checked_by;
branch_name = "Brampton Library Main Branch";
Console.WriteLine($"Welcome to the {branch_name}");
public void displayinformation()
Console.WriteLine($"Title: {Title}");
Console.WriteLine($"Author: {Author}");
Console.WriteLine($"Year: {year}");
Console.WriteLine($"Item Type: {Item_type}");
Console.WriteLine($"Availability: {(avaibility ? "Available" : "Not Available")}");
Console.WriteLine($"Checked by {checked_by}");
public class Book : Library
DateTime now = DateTime.Now;
Console.WriteLine($"Reading {Title}...{now}");
public void Book_return()
DateTime now = DateTime.Now;
Console.WriteLine($"Returned the book '{Title}'... AT {now}");
public void Display_book_info()
Console.WriteLine($"Pages: {Pages} \nGenre: {Genre}");
public class Fiction_book : Book
public class nonfiction_book : Book
public class Periodical : Library
public string Issue_date;
public void Display_Periodical_book_info()
if (Item_type == "Magazine")
Subject = "Fashion, Sports & Health";
if (Item_type == "Comic")
Subject = "Funny,cartoon";
Console.WriteLine($"Subject: {Subject}");
Console.WriteLine($"Issue date: {Issue_date}");
public class Newspaper : Library
public string paper_date;
public void Display_newspaper_info()
Console.WriteLine($"Newspaper Issue date: {paper_date}");
Console.WriteLine($"Region : {region}");
public static void Main()
Title = "The Harry Potter",
checked_by = "Dipto Acharjee",
Periodical periodical_book = new Periodical
Author = "John Bayne Maclean",
Issue_date = "20 May 2024",
Newspaper newspaper = new Newspaper
Title = "The Toronto Star",
Author = "Anne Marie Owens",
paper_date = "28 May 2024",
Console.WriteLine("\nBook information and method check\n");
book.Display_book_info();
Console.WriteLine("\nBook returning information\n");
Console.WriteLine("\nBook information Now(Updated)\n");
book.Display_book_info();
Console.WriteLine("\nPeriodical Magazine information \n");
periodical_book.Display_Periodical_book_info();
Console.WriteLine("\nNewspaper information \n");
newspaper.Display_newspaper_info();