case class Author(name: String, nationality: String)
case class Book(title: String, author: Author, year: Int, category: String, price: Double, description: Option[String])
val authors = List(
Author("George Orwell", "British"),
Author("Harper Lee", "American"),
Author("F. Scott Fitzgerald", "American"),
Author("Aldous Huxley", "British"),
Author("Herman Melville", "American"),
Author("J.D. Salinger", "American"),
Author("Yuval Noah Harari", "Israeli")
)
val library = List(
Book("1984", authors(0), 1949, "Dystopian", 15.99, Some("A dystopian social science fiction novel and cautionary tale.")),
Book("To Kill a Mockingbird", authors(1), 1960, "Fiction", 10.99, Some("A novel about the serious issues of rape and racial inequality.")),
Book("The Great Gatsby", authors(2), 1925, "Classic", 8.99, Some("A story of the mysteriously wealthy Jay Gatsby and his love for Daisy Buchanan.")),
Book("Brave New World", authors(3), 1932, "Dystopian", 12.99, None),
Book("Moby Dick", authors(4), 1851, "Classic", 9.99, Some("The narrative of Captain Ahab's obsessive quest to kill the giant white sperm whale Moby Dick.")),
Book("The Catcher in the Rye", authors(5), 1951, "Fiction", 14.99, Some("A novel about teenage rebellion and alienation."))
)