1
1
Fork 0

Edited exercises for 'Inheritance & Extensions'

This commit is contained in:
Svetlana Isakova 2020-07-29 20:53:54 +02:00
parent 384472327f
commit 7edc5a8907
16 changed files with 172 additions and 282 deletions

View File

@ -1,82 +1,54 @@
// InheritanceExtensions/InhExtensionsEx1.kt
package inheritanceAndExtensionsExercise1
import atomictest.trace
import atomictest.*
class DeltaTemperature(
val current: Double,
val target: Double
)
fun DeltaTemperature.heat() {
if (current < target)
trace("heating to $target")
// Duck Library
interface Duck {
fun quack()
fun swim()
}
fun DeltaTemperature.cool() {
if (current > target)
trace("cooling to $target")
class RealDuck: Duck {
override fun quack() = trace("quack")
override fun swim() = trace("swim")
}
fun DeltaTemperature.openWindow() {
if (current > target)
trace("cooling to $target")
fun interactWithDuck(duck: Duck) {
duck.quack()
duck.swim()
}
fun DeltaTemperature.fan() {
if (current > target)
trace("cooling to $target")
// Our codebase
interface Crocodile {
fun bite()
}
class DeltaTemperature2(
val current: Double,
val target: Double
) {
fun heat() {
if (current < target)
trace("heating to $target")
}
fun cool() {
if (current > target)
trace("cooling to $target")
}
fun openWindow() {
if (current > target)
trace("cooling to $target")
}
fun fan() {
if (current > target)
trace("cooling to $target")
}
class RealCrocodile: Crocodile {
override fun bite() = trace("Mnom-mnom")
}
fun adjust(deltaT: DeltaTemperature) {
deltaT.heat()
deltaT.cool()
deltaT.openWindow()
deltaT.fan()
fun interactWithCrocodile(crocodile: Crocodile) {
trace("Panic!!!")
crocodile.bite()
}
fun adjust(deltaT: DeltaTemperature2) {
deltaT.heat()
deltaT.cool()
deltaT.openWindow()
deltaT.fan()
class IAmHonestlyDuck(
val crocodile: Crocodile
) : Duck {
override fun quack() = crocodile.bite()
override fun swim() = crocodile.bite()
}
fun mimicDuck(crocodile: Crocodile): IAmHonestlyDuck =
IAmHonestlyDuck(crocodile)
fun main() {
adjust(DeltaTemperature(60.0, 70.0))
adjust(DeltaTemperature(80.0, 60.0))
adjust(DeltaTemperature2(60.0, 70.0))
adjust(DeltaTemperature2(80.0, 60.0))
val honestlyDuck = mimicDuck(RealCrocodile())
interactWithDuck(honestlyDuck)
interactWithCrocodile(honestlyDuck.crocodile)
trace eq """
heating to 70.0
cooling to 60.0
cooling to 60.0
cooling to 60.0
heating to 70.0
cooling to 60.0
cooling to 60.0
cooling to 60.0
Mnom-mnom
Mnom-mnom
Panic!!!
Mnom-mnom
"""
}

View File

@ -2,5 +2,20 @@ type: edu
files:
- name: src/Task.kt
visible: true
placeholders:
- offset: 526
length: 145
placeholder_text: |-
class IAmHonestlyDuck(
val crocodile: Crocodile
)
- offset: 730
length: 26
placeholder_text: TODO()
- offset: 819
length: 80
placeholder_text: |-
// interactWithDuck(honestlyDuck)
// interactWithCrocodile(honestlyDuck.crocodile)
- name: test/Tests.kt
visible: false

View File

@ -1,2 +1,2 @@
id: 1305749
update_date: Tue, 12 May 2020 16:24:22 UTC
id: 1305751
update_date: Tue, 12 May 2020 16:24:25 UTC

View File

@ -1,7 +1,8 @@
## Inheritance & Extensions (#1)
Starting with `TemperatureDelta.kt`, add two extension functions `openWindow()`
and `fan()` as cooling strategies. Add a class `TemperatureDelta2`, but use
member functions instead of extension functions. Add an overloaded `adjust()`
function that takes a `TemperatureDelta2`. Which approach is better, or do they
seem about the same?
The starter code contains `Duck` and `interactWithDuck` declarations (we assume
they're part of the third-party library). Implement the `mimicDuck` function
that dynamically adapts an object, accepting a `Crocodile` and returning an
`IAmHonestlyDuck`. `IAmHonestlyDuck` should implement `Duck` and delegate both
`Duck` member functions to `crocodile.bite()`. Is it possible to use the
inheritance approach, or are you forced to use composition?

View File

@ -1,65 +1,42 @@
// InheritanceExtensions/InhExtensionsEx2.kt
// InheritanceExtensions/InhExtensionsEx1.kt
package inheritanceAndExtensionsExercise2
import atomictest.*
interface Energy {
fun replenish() = trace("Fill Bowl")
open class Dog {
open fun speak() = trace("Bark!")
open fun sit() = trace("Sitting...")
}
open class Pet(open val energy: Energy) {
open fun speak() = trace("")
open fun settle() = trace("")
open fun feed() = energy.replenish()
open class RealDog : Dog() {
fun feed() = trace("Feed")
}
class DogFood : Energy
open class Dog : Pet(DogFood()) {
override fun speak() = trace("Bark!")
override fun settle() = trace("Sitting...")
class ToyDog : Dog() {
override fun speak() = trace("b.a.r.k.")
fun changeBatteries() = trace("Change batteries")
}
class CatFood : Energy
open class Cat : Pet(CatFood()) {
override fun speak() = trace("Meow!")
override fun settle() =
trace("In my basket...")
fun Dog.play() {
speak()
sit()
}
class Batteries : Energy {
override fun replenish() =
trace("Change batteries")
fun RealDog.play() {
(this as Dog).play()
feed()
}
class ToyDog: Dog() {
override val energy = Batteries()
}
fun play(pet: Pet) = pet.speak()
fun playWithPet(pet: Pet) {
play(pet)
pet.settle()
pet.energy.replenish()
fun ToyDog.play() {
(this as Dog).play()
changeBatteries()
}
fun main() {
val dog1 = Dog()
val dog2 = ToyDog()
val cat = Cat()
playWithPet(dog1)
playWithPet(dog2)
playWithPet(cat)
val dog: Dog = ToyDog()
dog.play()
trace eq """
Bark!
Sitting...
Fill Bowl
Bark!
Sitting...
Change batteries
Meow!
In my basket...
Fill Bowl
b.a.r.k.
Sitting...
"""
}

View File

@ -2,5 +2,18 @@ type: edu
files:
- name: src/Task.kt
visible: true
placeholders:
- offset: 405
length: 15
placeholder_text: TODO()
- offset: 447
length: 29
placeholder_text: TODO()
- offset: 502
length: 40
placeholder_text: TODO()
- offset: 617
length: 23
placeholder_text: TODO
- name: test/Tests.kt
visible: false

View File

@ -1,2 +1,2 @@
id: 1305750
update_date: Tue, 12 May 2020 16:24:24 UTC
id: 1305749
update_date: Tue, 12 May 2020 16:24:22 UTC

View File

@ -1,37 +1,23 @@
## Inheritance & Extensions (#2)
Use composition to create `HVAC` instead of inheritance. The starter code
provides an identical copy of `warmAndCool()` for your new `HVAC` type, and
test code in `main()`. Prove to yourself that `warm()` doesn't work with your
composed type.
The starter code defines the following hierarchy: a superclass `Dog` and two
subclasses, `ToyDog` and `RealDog`. Implement an extension function `play` to
`Dog` which first calls `speak()`, then `sit()`.
> Solution 2
Implement two more extension functions with the same name `play` to `RealDog`
and to `ToyDog`. Both functions should call `Dog.play()` first, then
`RealdDog.play()` should call `feed()`, while `ToyDog.play()` should call
`changeBatteries()`.
Guess what the code in `main()` will trace and then check yourself.
<div class="hint">
To call a `Dog.play` function inside an extension to a `Dog` subclass
(e.g. inside `ToyDog.play()`), cast `this` to `Dog` explicitly:
```kotlin
// InheritanceExtensions/InhExtensionsEx2.kt
package inheritanceAndExtensionsExercise2
import inheritanceextensions.Heater
import inheritanceextensions.warm
import atomictest.*
(this as Dog).play()
```
class HVAC {
private val heater = Heater()
fun heat(temperature: Int) =
heater.heat(temperature)
fun cool(temperature: Int) =
"cooling to $temperature"
}
fun warmAndCool(hvac: HVAC) {
hvac.heat(70) eq "heating to 70"
hvac.cool(60) eq "cooling to 60"
}
fun main() {
val heater = Heater()
val hvac = HVAC()
warm(heater)
// warm(hvac) // Doesn't work
warmAndCool(hvac)
}
```
</div>

View File

@ -1,39 +0,0 @@
// InheritanceExtensions/InhExtensionsEx3.kt
package inheritanceAndExtensionsExercise3
import usefullibrary.*
import atomictest.*
class MyClass {
fun g() = trace("g()")
fun h() = trace("h()")
}
fun useMyClass(mc: MyClass) {
mc.g()
mc.h()
}
class MyClassAdaptedForLib(
val field: MyClass
) : LibType {
override fun f1() = field.h()
override fun f2() = field.g()
}
fun adapt(mc: MyClass) =
MyClassAdaptedForLib(mc)
fun main() {
val mc = adapt(MyClass())
utility1(mc)
utility2(mc)
useMyClass(mc.field)
trace eq """
h()
g()
g()
h()
g()
h()
"""
}

View File

@ -1,6 +0,0 @@
type: edu
files:
- name: src/Task.kt
visible: true
- name: test/Tests.kt
visible: false

View File

@ -1,2 +0,0 @@
id: 1305751
update_date: Tue, 12 May 2020 16:24:25 UTC

View File

@ -1,7 +0,0 @@
## Inheritance & Extensions (#3)
Starting with `Adapter.kt` and `ComposeAdapter.kt`, create a function that
dynamically adapts an object, accepting a `MyClass` and returning a
`MyClassAdaptedForLib`. Is it possible to use the inheritance approach in
`Adapter.kt`, or are you forced to use composition? (We'll revisit this issue
in [Class Delegation]).

View File

@ -1,11 +0,0 @@
package inheritanceAndExtensionsExercise3
import org.junit.Test
import util.unimplementedTest
class TestInheritanceAndExtensionsExercise3 {
@Test fun testSolution() {
//TODO: implement your test here
unimplementedTest()
}
}

View File

@ -2,4 +2,3 @@ content:
- Examples
- Exercise 1
- Exercise 2
- Exercise 3

View File

@ -3613,146 +3613,141 @@ public class TestAllExamples extends AbstractTestExamples {
@Test
public void testTask226() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Inheritance & Extensions/Exercise 3/src/Task.kt", inheritanceAndExtensionsExercise3.TaskKt::main);
}
@Test
public void testTask227() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Class Delegation/Exercise 1/src/Task.kt", classDelegationExercise1.TaskKt::main);
}
@Test
public void testTask228() {
public void testTask227() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Class Delegation/Exercise 2/src/Task.kt", classDelegationExercise2.TaskKt::main);
}
@Test
public void testTask229() {
public void testTask228() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Class Delegation/Exercise 3/src/Task.kt", classDelegationExercise3.TaskKt::main);
}
@Test
public void testTask230() {
public void testTask229() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Downcasting/Exercise 1/src/Task.kt", downcastingExercise1.TaskKt::main);
}
@Test
public void testTask231() {
public void testTask230() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Downcasting/Exercise 2/src/Task.kt", downcastingExercise2.TaskKt::main);
}
@Test
public void testTask232() {
public void testTask231() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Downcasting/Exercise 3/src/Task.kt", downcastingExercise3.TaskKt::main);
}
@Test
public void testTask233() {
public void testTask232() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Sealed Classes/Exercise 1/src/Task.kt", sealedClassesExercise1.TaskKt::main);
}
@Test
public void testTask234() {
public void testTask233() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Sealed Classes/Exercise 2/src/Task.kt", sealedClassesExercise2.TaskKt::main);
}
@Test
public void testTask235() {
public void testTask234() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Sealed Classes/Exercise 3/src/Task.kt", sealedClassesExercise3.TaskKt::main);
}
@Test
public void testTask236() {
public void testTask235() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Type Checking/Exercise 1/src/Task.kt", typeCheckingExercise1.TaskKt::main);
}
@Test
public void testTask237() {
public void testTask236() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Type Checking/Exercise 2/src/Task.kt", typeCheckingExercise2.TaskKt::main);
}
@Test
public void testTask238() {
public void testTask237() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Type Checking/Exercise 3/src/Task.kt", typeCheckingExercise3.TaskKt::main);
}
@Test
public void testTask239() {
public void testTask238() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Nested Classes/Exercise 1/src/Task.kt", nestedClassesExercise1.TaskKt::main);
}
@Test
public void testTask240() {
public void testTask239() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Nested Classes/Exercise 2/src/Task.kt", nestedClassesExercise2.TaskKt::main);
}
@Test
public void testTask241() {
public void testTask240() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Nested Classes/Exercise 3/src/Task.kt", nestedClassesExercise3.TaskKt::main);
}
@Test
public void testTask242() {
public void testTask241() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Nested Classes/Exercise 4/src/Task.kt", nestedClassesExercise4.TaskKt::main);
}
@Test
public void testTask243() {
public void testTask242() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Inner Classes/Exercise 1/src/Task.kt", innerClassesExercise1.TaskKt::main);
}
@Test
public void testTask244() {
public void testTask243() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Inner Classes/Exercise 2/src/Task.kt", innerClassesExercise2.TaskKt::main);
}
@Test
public void testTask245() {
public void testTask244() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Inner Classes/Exercise 3/src/Task.kt", innerClassesExercise3.TaskKt::main);
}
@Test
public void testTask246() {
public void testTask245() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Objects/Exercise 1/src/Task.kt", objectsExercise1.TaskKt::main);
}
@Test
public void testTask247() {
public void testTask246() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Objects/Exercise 2/src/Task.kt", objectsExercise2.TaskKt::main);
}
@Test
public void testTask248() {
public void testTask247() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Objects/Exercise 3/src/Task.kt", objectsExercise3.TaskKt::main);
}
@Test
public void testTask249() {
public void testTask248() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Companion Objects/Exercise 1/src/Task.kt", companionObjectsExercise1.TaskKt::main);
}
@Test
public void testTask250() {
public void testTask249() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Companion Objects/Exercise 2/src/Task.kt", companionObjectsExercise2.TaskKt::main);
}
@Test
public void testTask251() {
public void testTask250() {
testExample("../AtomicKotlinCourse/Object-Oriented Programming/Companion Objects/Exercise 3/src/Task.kt", companionObjectsExercise3.TaskKt::main);
}
@Test
public void testTask252() {
public void testTask251() {
testExample("../AtomicKotlinCourse/Power Tools/Scope Functions/Exercise 1/src/Task.kt", scopeFunctionsExercise1.TaskKt::main);
}
@Test
public void testTask253() {
public void testTask252() {
testExample("../AtomicKotlinCourse/Power Tools/Scope Functions/Exercise 2/src/Task.kt", scopeFunctionsExercise2.TaskKt::main);
}
@Test
public void testTask254() {
public void testTask253() {
testExample("../AtomicKotlinCourse/Power Tools/Scope Functions/Exercise 3/src/Task.kt", scopeFunctionsExercise3.TaskKt::main);
}
}

View File

@ -633,104 +633,101 @@ class TestAllExercises : AbstractTestExercises() {
fun `test#208 Polymorphism Exercise#2`() = testClass(polymorphismExercise2.TestPolymorphismExercise2::class)
@Test
fun `test#210 Composition Exercise#1`() = testClass(compositionExercise1.TestCompositionExercise1::class)
fun `test#209 Composition Exercise#1`() = testClass(compositionExercise1.TestCompositionExercise1::class)
@Test
fun `test#211 Composition Exercise#2`() = testClass(compositionExercise2.TestCompositionExercise2::class)
fun `test#210 Composition Exercise#2`() = testClass(compositionExercise2.TestCompositionExercise2::class)
@Test
fun `test#212 Composition Exercise#3`() = testClass(compositionExercise3.TestCompositionExercise3::class)
fun `test#211 Composition Exercise#3`() = testClass(compositionExercise3.TestCompositionExercise3::class)
@Test
fun `test#213 InheritanceAndExtensions Exercise#1`() = testClass(inheritanceAndExtensionsExercise1.TestInheritanceAndExtensionsExercise1::class)
fun `test#212 InheritanceAndExtensions Exercise#1`() = testClass(inheritanceAndExtensionsExercise1.TestInheritanceAndExtensionsExercise1::class)
@Test
fun `test#214 InheritanceAndExtensions Exercise#2`() = testClass(inheritanceAndExtensionsExercise2.TestInheritanceAndExtensionsExercise2::class)
fun `test#213 InheritanceAndExtensions Exercise#2`() = testClass(inheritanceAndExtensionsExercise2.TestInheritanceAndExtensionsExercise2::class)
@Test
fun `test#215 InheritanceAndExtensions Exercise#3`() = testClass(inheritanceAndExtensionsExercise3.TestInheritanceAndExtensionsExercise3::class)
fun `test#214 ClassDelegation Exercise#1`() = testClass(classDelegationExercise1.TestClassDelegationExercise1::class)
@Test
fun `test#216 ClassDelegation Exercise#1`() = testClass(classDelegationExercise1.TestClassDelegationExercise1::class)
fun `test#215 ClassDelegation Exercise#2`() = testClass(classDelegationExercise2.TestClassDelegationExercise2::class)
@Test
fun `test#217 ClassDelegation Exercise#2`() = testClass(classDelegationExercise2.TestClassDelegationExercise2::class)
fun `test#216 ClassDelegation Exercise#3`() = testClass(classDelegationExercise3.TestClassDelegationExercise3::class)
@Test
fun `test#218 ClassDelegation Exercise#3`() = testClass(classDelegationExercise3.TestClassDelegationExercise3::class)
fun `test#217 Downcasting Exercise#1`() = testClass(downcastingExercise1.TestDowncastingExercise1::class)
@Test
fun `test#219 Downcasting Exercise#1`() = testClass(downcastingExercise1.TestDowncastingExercise1::class)
fun `test#218 Downcasting Exercise#2`() = testClass(downcastingExercise2.TestDowncastingExercise2::class)
@Test
fun `test#220 Downcasting Exercise#2`() = testClass(downcastingExercise2.TestDowncastingExercise2::class)
fun `test#219 Downcasting Exercise#3`() = testClass(downcastingExercise3.TestDowncastingExercise3::class)
@Test
fun `test#221 Downcasting Exercise#3`() = testClass(downcastingExercise3.TestDowncastingExercise3::class)
fun `test#220 SealedClasses Exercise#1`() = testClass(sealedClassesExercise1.TestSealedClassesExercise1::class)
@Test
fun `test#222 SealedClasses Exercise#1`() = testClass(sealedClassesExercise1.TestSealedClassesExercise1::class)
fun `test#221 SealedClasses Exercise#2`() = testClass(sealedClassesExercise2.TestSealedClassesExercise2::class)
@Test
fun `test#223 SealedClasses Exercise#2`() = testClass(sealedClassesExercise2.TestSealedClassesExercise2::class)
fun `test#222 SealedClasses Exercise#3`() = testClass(sealedClassesExercise3.TestSealedClassesExercise3::class)
@Test
fun `test#224 SealedClasses Exercise#3`() = testClass(sealedClassesExercise3.TestSealedClassesExercise3::class)
fun `test#223 TypeChecking Exercise#1`() = testClass(typeCheckingExercise1.TestTypeCheckingExercise1::class)
@Test
fun `test#225 TypeChecking Exercise#1`() = testClass(typeCheckingExercise1.TestTypeCheckingExercise1::class)
fun `test#224 TypeChecking Exercise#2`() = testClass(typeCheckingExercise2.TestTypeCheckingExercise2::class)
@Test
fun `test#226 TypeChecking Exercise#2`() = testClass(typeCheckingExercise2.TestTypeCheckingExercise2::class)
fun `test#225 TypeChecking Exercise#3`() = testClass(typeCheckingExercise3.TestTypeCheckingExercise3::class)
@Test
fun `test#227 TypeChecking Exercise#3`() = testClass(typeCheckingExercise3.TestTypeCheckingExercise3::class)
fun `test#226 NestedClasses Exercise#1`() = testClass(nestedClassesExercise1.TestNestedClassesExercise1::class)
@Test
fun `test#228 NestedClasses Exercise#1`() = testClass(nestedClassesExercise1.TestNestedClassesExercise1::class)
fun `test#227 NestedClasses Exercise#2`() = testClass(nestedClassesExercise2.TestNestedClassesExercise2::class)
@Test
fun `test#229 NestedClasses Exercise#2`() = testClass(nestedClassesExercise2.TestNestedClassesExercise2::class)
fun `test#228 NestedClasses Exercise#3`() = testClass(nestedClassesExercise3.TestNestedClassesExercise3::class)
@Test
fun `test#230 NestedClasses Exercise#3`() = testClass(nestedClassesExercise3.TestNestedClassesExercise3::class)
fun `test#229 NestedClasses Exercise#4`() = testClass(nestedClassesExercise4.TestNestedClassesExercise4::class)
@Test
fun `test#231 NestedClasses Exercise#4`() = testClass(nestedClassesExercise4.TestNestedClassesExercise4::class)
fun `test#230 InnerClasses Exercise#1`() = testClass(innerClassesExercise1.TestInnerClassesExercise1::class)
@Test
fun `test#232 InnerClasses Exercise#1`() = testClass(innerClassesExercise1.TestInnerClassesExercise1::class)
fun `test#231 InnerClasses Exercise#2`() = testClass(innerClassesExercise2.TestInnerClassesExercise2::class)
@Test
fun `test#233 InnerClasses Exercise#2`() = testClass(innerClassesExercise2.TestInnerClassesExercise2::class)
fun `test#232 InnerClasses Exercise#3`() = testClass(innerClassesExercise3.TestInnerClassesExercise3::class)
@Test
fun `test#234 InnerClasses Exercise#3`() = testClass(innerClassesExercise3.TestInnerClassesExercise3::class)
fun `test#233 Objects Exercise#1`() = testClass(objectsExercise1.TestObjectsExercise1::class)
@Test
fun `test#235 Objects Exercise#1`() = testClass(objectsExercise1.TestObjectsExercise1::class)
fun `test#234 Objects Exercise#2`() = testClass(objectsExercise2.TestObjectsExercise2::class)
@Test
fun `test#236 Objects Exercise#2`() = testClass(objectsExercise2.TestObjectsExercise2::class)
fun `test#235 Objects Exercise#3`() = testClass(objectsExercise3.TestObjectsExercise3::class)
@Test
fun `test#237 Objects Exercise#3`() = testClass(objectsExercise3.TestObjectsExercise3::class)
fun `test#236 CompanionObjects Exercise#1`() = testClass(companionObjectsExercise1.TestCompanionObjectsExercise1::class)
@Test
fun `test#238 CompanionObjects Exercise#1`() = testClass(companionObjectsExercise1.TestCompanionObjectsExercise1::class)
fun `test#237 CompanionObjects Exercise#2`() = testClass(companionObjectsExercise2.TestCompanionObjectsExercise2::class)
@Test
fun `test#239 CompanionObjects Exercise#2`() = testClass(companionObjectsExercise2.TestCompanionObjectsExercise2::class)
fun `test#238 CompanionObjects Exercise#3`() = testClass(companionObjectsExercise3.TestCompanionObjectsExercise3::class)
@Test
fun `test#240 CompanionObjects Exercise#3`() = testClass(companionObjectsExercise3.TestCompanionObjectsExercise3::class)
fun `test#239 ScopeFunctions Exercise#1`() = testClass(scopeFunctionsExercise1.TestScopeFunctionsExercise1::class)
@Test
fun `test#241 ScopeFunctions Exercise#1`() = testClass(scopeFunctionsExercise1.TestScopeFunctionsExercise1::class)
fun `test#240 ScopeFunctions Exercise#2`() = testClass(scopeFunctionsExercise2.TestScopeFunctionsExercise2::class)
@Test
fun `test#242 ScopeFunctions Exercise#2`() = testClass(scopeFunctionsExercise2.TestScopeFunctionsExercise2::class)
@Test
fun `test#243 ScopeFunctions Exercise#3`() = testClass(scopeFunctionsExercise3.TestScopeFunctionsExercise3::class)
fun `test#241 ScopeFunctions Exercise#3`() = testClass(scopeFunctionsExercise3.TestScopeFunctionsExercise3::class)
}