Skip to content

Commit 4cb1caa

Browse files
committed
Atividades em Kotlin
Pull de novas atividades em Kotlin
1 parent 398e70f commit 4cb1caa

File tree

8 files changed

+30
-2
lines changed

8 files changed

+30
-2
lines changed
Binary file not shown.
Binary file not shown.

.gradle/7.2/fileHashes/fileHashes.bin

150 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

src/main/kotlin/Myapp/Aquarium.kt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package Myapp
2+
3+
class Aquarium {
4+
5+
var width: Int = 20
6+
var height: Int = 40
7+
var length: Int = 100
8+
}

src/main/kotlin/Myapp/main.kt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package Myapp
2+
3+
fun buildAquarium() {
4+
val myAquarium = Aquarium()
5+
}
6+
7+
fun main() {
8+
buildAquarium()
9+
}
10+
11+
fun printSize() {
12+
println("Width: $width cm " +
13+
"Length: $length cm " +
14+
"Height: $height cm ")
15+
}
16+
fun buildAquarium() {
17+
val myAquarium = Aquarium()
18+
myAquarium.printSize()
19+
}
20+

src/main/kotlin/PrimeiroProjeto/Hello.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ fun main() {
4848
fun increaseDirty( start: Int) = start + 1
4949
println(updateDirty(15, ::increaseDirty))
5050

51-
var dirtyLevel = 19;
52-
dirtyLevel = updateDirty(dirtyLevel) { dirtyLevel -> dirtyLevel + 23}
51+
var dirtyLevelProperty1 = 19;
52+
dirtyLevelProperty1 = updateDirty(dirtyLevel) { dirtyLevel -> dirtyLevel + 23}
5353
println(dirtyLevel)
5454
}

0 commit comments

Comments
 (0)