diff --git a/.idea/misc.xml b/.idea/misc.xml index 03f397c..10a22f9 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/src/Main.kt b/src/Main.kt index a7a5e00..2669565 100644 --- a/src/Main.kt +++ b/src/Main.kt @@ -1,3 +1,10 @@ fun main() { - println("Hello World!") + val hannibal = Book("The Silence of the Lambs", "Thomas Harris", 1988, "Thriller") + hannibal.printBookInfo() +} + +class Book(var title: String, var author: String, var yearPublished: Int, var genre: String) { + fun printBookInfo() { + println("$title By $author ($yearPublished)\nGenre: $genre") + } } \ No newline at end of file