case class Book( title :String, author :String, numPages :Int, isCopyrighted :Boolean ) // example of the data: var cih = Book( "The Cat in the Hat", "Seuss", 37, true ) Book( "The Soul of Wit", "Anonymous", 0, false ) printf( "I just read %s.\n", cih ); def enbiggen( original :Book ) :Book = Book( original.title, original.author, original.numPages * 2, original.isCopyrighted ) assert( enbiggen(cih).equals( Book( "The Cat in the Hat", "Seuss", 2*37, true ) ) ) def derive( original :Book, newAuthor :String, newNumPages :Int ) :Book = { Book( "Son of " + original.title, original.author + " & " + newAuthor, original.numPages + newNumPages, original.isCopyrighted ) }