diff --git a/Task7/.gitignore b/Task7/.gitignore new file mode 100644 index 0000000..3ddbf4c --- /dev/null +++ b/Task7/.gitignore @@ -0,0 +1,32 @@ +### IntelliJ IDEA ### +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Kotlin ### +.kotlin + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/Task7/.idea/.gitignore b/Task7/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Task7/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Task7/.idea/inspectionProfiles/Project_Default.xml b/Task7/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..df543e3 --- /dev/null +++ b/Task7/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/Task7/.idea/kotlinc.xml b/Task7/.idea/kotlinc.xml new file mode 100644 index 0000000..cba7a76 --- /dev/null +++ b/Task7/.idea/kotlinc.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/Task7/.idea/libraries/KotlinJavaRuntime.xml b/Task7/.idea/libraries/KotlinJavaRuntime.xml new file mode 100644 index 0000000..3e6dc71 --- /dev/null +++ b/Task7/.idea/libraries/KotlinJavaRuntime.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Task7/.idea/misc.xml b/Task7/.idea/misc.xml new file mode 100644 index 0000000..eeb80f7 --- /dev/null +++ b/Task7/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Task7/.idea/modules.xml b/Task7/.idea/modules.xml new file mode 100644 index 0000000..f7bdceb --- /dev/null +++ b/Task7/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Task7/.idea/vcs.xml b/Task7/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Task7/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Task7/Task7.iml b/Task7/Task7.iml new file mode 100644 index 0000000..43dd653 --- /dev/null +++ b/Task7/Task7.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Task7/src/Main.kt b/Task7/src/Main.kt new file mode 100644 index 0000000..a7a5e00 --- /dev/null +++ b/Task7/src/Main.kt @@ -0,0 +1,3 @@ +fun main() { + println("Hello World!") +} \ No newline at end of file diff --git a/Task7/src/classes.kt b/Task7/src/classes.kt new file mode 100644 index 0000000..a9aa42b --- /dev/null +++ b/Task7/src/classes.kt @@ -0,0 +1,23 @@ +class Book(var title: String, var author: String,var yearPublished: Int, var genre: String ){ +// var title: String = "" +// var author: String = "" +// var yearPublished: Int = 0 + + fun getBookInfo():String { + return " $title by $author ( $yearPublished ) Book genre : $genre" + } +} + + +fun main() { +val myBook = Book("Atomic Habits", "James Clear", 2018, "Self-help") +// myBook.title = "Atomic Habits" +// myBook.author = "James Clear" +// myBook.yearPublished = 2018 + + var bookInfo = myBook.getBookInfo() + println(bookInfo) + + +} +