diff --git a/Introduction to Objects/Constructors/Examples/src/VisibleArgs.kt b/Introduction to Objects/Constructors/Examples/src/VisibleArgs.kt index 30c96fd8..283eee4f 100644 --- a/Introduction to Objects/Constructors/Examples/src/VisibleArgs.kt +++ b/Introduction to Objects/Constructors/Examples/src/VisibleArgs.kt @@ -8,7 +8,7 @@ fun main() { val alien1 = MutableNameAlien("Reverse Giraffe") val alien2 = - FixedNameAlien("Krombopolis Michael") + FixedNameAlien("Krombopulos Michael") alien1.name = "Parasite" // Can't do this: diff --git a/Introduction to Objects/Testing/Examples/src/TestingExample.kt b/Introduction to Objects/Testing/Examples/src/TestingExample.kt index ea1055ea..214ba12b 100644 --- a/Introduction to Objects/Testing/Examples/src/TestingExample.kt +++ b/Introduction to Objects/Testing/Examples/src/TestingExample.kt @@ -10,10 +10,10 @@ fun main() { v2 eq "Ontology" // 'neq' means "not equal" - v2 neq "Epistimology" + v2 neq "Epistemology" - // [Error] Epistimology != Ontology - // v2 eq "Epistimology" + // [Error] Epistemology != Ontology + // v2 eq "Epistemology" } /* Output: 11 diff --git a/Programming Basics/Booleans/Examples/src/Closed.kt b/Programming Basics/Booleans/Examples/src/Closed.kt index de1c2a24..518eb1bd 100644 --- a/Programming Basics/Booleans/Examples/src/Closed.kt +++ b/Programming Basics/Booleans/Examples/src/Closed.kt @@ -4,7 +4,7 @@ fun isClosed(hour: Int) { val open = 9 val closed = 20 println("Operating hours: $open - $closed") - val status = hour < open || hour > closed + val status = hour < open || hour >= closed println("Closed: $status") } diff --git a/Programming Basics/Booleans/Examples/src/Open1.kt b/Programming Basics/Booleans/Examples/src/Open1.kt index 6b997160..f51c7f3c 100644 --- a/Programming Basics/Booleans/Examples/src/Open1.kt +++ b/Programming Basics/Booleans/Examples/src/Open1.kt @@ -5,7 +5,7 @@ fun isOpen1(hour: Int) { val closed = 20 println("Operating hours: $open - $closed") val status = - if (hour >= open && hour <= closed) // [1] + if (hour >= open && hour < closed) // [1] true else false diff --git a/Programming Basics/Booleans/Examples/src/Open2.kt b/Programming Basics/Booleans/Examples/src/Open2.kt index a22db59a..f3ecc7ec 100644 --- a/Programming Basics/Booleans/Examples/src/Open2.kt +++ b/Programming Basics/Booleans/Examples/src/Open2.kt @@ -4,7 +4,7 @@ fun isOpen2(hour: Int) { val open = 9 val closed = 20 println("Operating hours: $open - $closed") - val status = hour >= open && hour <= closed + val status = hour >= open && hour < closed println("Open: $status") } diff --git a/Programming Basics/Summary 1/Examples/src/Booleans.kt b/Programming Basics/Summary 1/Examples/src/Booleans.kt index 5cc6c02a..d03b565d 100644 --- a/Programming Basics/Summary 1/Examples/src/Booleans.kt +++ b/Programming Basics/Summary 1/Examples/src/Booleans.kt @@ -7,11 +7,11 @@ fun main() { val hour = 6 println("Current time: " + hour) - val isOpen = hour >= opens && hour <= closes + val isOpen = hour >= opens && hour < closes println("Open: " + isOpen) println("Not open: " + !isOpen) - val isClosed = hour < opens || hour > closes + val isClosed = hour < opens || hour >= closes println("Closed: " + isClosed) } /* Output: diff --git a/Programming Basics/Summary 1/Examples/src/IfExpression.kt b/Programming Basics/Summary 1/Examples/src/IfExpression.kt index 590956b6..60716e22 100644 --- a/Programming Basics/Summary 1/Examples/src/IfExpression.kt +++ b/Programming Basics/Summary 1/Examples/src/IfExpression.kt @@ -11,7 +11,7 @@ fun main() { val closes = 20 println("Operating hours: " + opens + " - " + closes) - hour >= opens && hour <= closes + hour >= opens && hour < closes } else { false } diff --git a/Usability/Data Classes/Examples/src/CopyDataClass.kt b/Usability/Data Classes/Examples/src/CopyDataClass.kt index 04a04049..5ef58aee 100644 --- a/Usability/Data Classes/Examples/src/CopyDataClass.kt +++ b/Usability/Data Classes/Examples/src/CopyDataClass.kt @@ -14,7 +14,7 @@ fun main() { "Miffy", "Miller", "1-234-567890", - "1600 Amphitheatre Parkway") + "1600 Amphitheater Parkway") val newContact = contact.copy( number = "098-765-4321", address = "Brandschenkestrasse 110")