From fdeb188ebc1c85cd0f34bbb71e459cf8a9168cba Mon Sep 17 00:00:00 2001 From: sofiiako <19rubisco93@gmail.com> Date: Tue, 14 Sep 2021 22:45:36 +0300 Subject: [PATCH 1/2] fix(Placeholders in Polymorphism Task 1): Fixed broken and removed extra mutant placeholder that was interfering with course compilation; commented main --- .../Polymorphism/Exercise 1/src/Task.kt | 3 ++- .../Polymorphism/Exercise 1/task-info.yaml | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Object-Oriented Programming/Polymorphism/Exercise 1/src/Task.kt b/Object-Oriented Programming/Polymorphism/Exercise 1/src/Task.kt index da069341..c29ab58a 100644 --- a/Object-Oriented Programming/Polymorphism/Exercise 1/src/Task.kt +++ b/Object-Oriented Programming/Polymorphism/Exercise 1/src/Task.kt @@ -47,7 +47,7 @@ class Wizard: fun Character.playTurn() = name + ": " + play() fun main() { - listOf( +/* listOf( Warrior(), Elf(), FightingElf(), @@ -57,4 +57,5 @@ fun main() { "[Warrior: Fight!, Elf: Magic!, " + "FightingElf: Magic!Fight!, " + "Dragon: Fly!, Wizard: Magic!Fly!]" +*/ } \ No newline at end of file diff --git a/Object-Oriented Programming/Polymorphism/Exercise 1/task-info.yaml b/Object-Oriented Programming/Polymorphism/Exercise 1/task-info.yaml index 38d5e4eb..3d86b148 100644 --- a/Object-Oriented Programming/Polymorphism/Exercise 1/task-info.yaml +++ b/Object-Oriented Programming/Polymorphism/Exercise 1/task-info.yaml @@ -5,12 +5,9 @@ files: placeholders: - offset: 592 length: 76 - placeholder_text: class Dragon + placeholder_text: '// class Dragon:' - offset: 670 length: 98 - placeholder_text: class Wizard - - offset: 924 - length: 13 - placeholder_text: TODO() + placeholder_text: '// class Wizard:' - name: test/Tests.kt visible: false From 62b2d2854849d1d7a2f8c7c98151d0ef5ba5082c Mon Sep 17 00:00:00 2001 From: sofiiako <19rubisco93@gmail.com> Date: Tue, 14 Sep 2021 23:09:44 +0300 Subject: [PATCH 2/2] fix(Placeholders in Downcasting Task 1): Fixed placeholder: previously it also covered main so there was no way to test the solution --- Object-Oriented Programming/Downcasting/Exercise 1/src/Task.kt | 3 ++- .../Downcasting/Exercise 1/task-info.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Object-Oriented Programming/Downcasting/Exercise 1/src/Task.kt b/Object-Oriented Programming/Downcasting/Exercise 1/src/Task.kt index a9758609..1f2bfa1c 100644 --- a/Object-Oriented Programming/Downcasting/Exercise 1/src/Task.kt +++ b/Object-Oriented Programming/Downcasting/Exercise 1/src/Task.kt @@ -25,7 +25,7 @@ fun checkAndCall(b: Base) { } fun main() { - checkAndCall(Derived1()) // Upcast +/* checkAndCall(Derived1()) // Upcast checkAndCall(Derived2()) // Upcast trace eq """ Derived1.f() @@ -33,4 +33,5 @@ fun main() { Derived2.f() Derived2.h() """ + */ } \ No newline at end of file diff --git a/Object-Oriented Programming/Downcasting/Exercise 1/task-info.yaml b/Object-Oriented Programming/Downcasting/Exercise 1/task-info.yaml index da98f994..b28c08e8 100644 --- a/Object-Oriented Programming/Downcasting/Exercise 1/task-info.yaml +++ b/Object-Oriented Programming/Downcasting/Exercise 1/task-info.yaml @@ -4,7 +4,7 @@ files: visible: true placeholders: - offset: 80 - length: 540 + length: 361 placeholder_text: // TODO - name: test/Tests.kt visible: false