From 3d2f73a9739b6a7a23ae7bdaa1ed3cd57b8fbc8c Mon Sep 17 00:00:00 2001 From: Sandro Micalizzi <149710478+smicaliz@users.noreply.github.com> Date: Sun, 26 Nov 2023 16:52:02 +0100 Subject: [PATCH 1/3] Fixed typos --- exercises/concept/wizards-and-warriors/.docs/hints.md | 2 +- .../concept/wizards-and-warriors/.docs/introduction.md | 7 +++---- .../.meta/src/reference/java/Fighter.java | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/exercises/concept/wizards-and-warriors/.docs/hints.md b/exercises/concept/wizards-and-warriors/.docs/hints.md index 7546a457b..823810418 100644 --- a/exercises/concept/wizards-and-warriors/.docs/hints.md +++ b/exercises/concept/wizards-and-warriors/.docs/hints.md @@ -9,7 +9,7 @@ The whole inheritance concept has a lot to do with the concepts around [overridi - In Java, the `toString()` method is actually present inside the `Object` class (which is a superclass to all the classes in Java). You can read more about it [here][object-class-java]. -- To override this method inside your implementation class, you should have a method with same name i.e `toString()` and same return type i.e `String`. +- To override this method inside your implementation class, you should have a method with same name i.e. `toString()` and same return type i.e. `String`. ## 2. Making Fighters not vulnerable by default diff --git a/exercises/concept/wizards-and-warriors/.docs/introduction.md b/exercises/concept/wizards-and-warriors/.docs/introduction.md index 936e0deb9..b6ca66535 100644 --- a/exercises/concept/wizards-and-warriors/.docs/introduction.md +++ b/exercises/concept/wizards-and-warriors/.docs/introduction.md @@ -2,9 +2,8 @@ ## Inheritance -Inheritance is a core concept in OOP (Object Oriented Programming). It donates IS-A relationship. -It literally means in programming as it means in english, inheriting features from parent(in programming features is normally functions -and variables). +Inheritance is a core concept in OOP (Object-Oriented Programming). It donates IS-A relationship. +It literally means in programming as it means in english, inheriting features from parent(in programming features is normally functions and variables). Consider a class, `Animal` as shown, @@ -13,7 +12,7 @@ Consider a class, `Animal` as shown, public class Animal { public void bark() { - System.out.println("This is a animal"); + System.out.println("This is an animal"); } } diff --git a/exercises/concept/wizards-and-warriors/.meta/src/reference/java/Fighter.java b/exercises/concept/wizards-and-warriors/.meta/src/reference/java/Fighter.java index 2e7eb2eba..d11cab7cf 100644 --- a/exercises/concept/wizards-and-warriors/.meta/src/reference/java/Fighter.java +++ b/exercises/concept/wizards-and-warriors/.meta/src/reference/java/Fighter.java @@ -3,7 +3,7 @@ abstract class Fighter { /** * this method sets the default vulnerability to false for all the child classes. * - * @return the vulnerability i.e false. + * @return the vulnerability i.e. false. */ boolean isVulnerable() { return false; From b84fd86133bef28186a016ef81775f18b97a34bf Mon Sep 17 00:00:00 2001 From: Sandro Micalizzi <149710478+smicaliz@users.noreply.github.com> Date: Tue, 28 Nov 2023 14:20:49 +0100 Subject: [PATCH 2/3] Modified the right document. Generated the introduction with configlet --- concepts/inheritance/introduction.md | 11 ++++++----- .../wizards-and-warriors/.docs/introduction.md | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/concepts/inheritance/introduction.md b/concepts/inheritance/introduction.md index 66d1c52e0..b0b5cc780 100644 --- a/concepts/inheritance/introduction.md +++ b/concepts/inheritance/introduction.md @@ -1,8 +1,9 @@ # Introduction -Inheritance is a core concept in OOP (Object Oriented Programming). It donates IS-A relationship. -It literally means in programming as it means in english, inheriting features from parent(in programming features is normally functions -and variables). +## Inheritance + +Inheritance is a core concept in OOP (Object-Oriented Programming). It donates IS-A relationship. +It literally means in programming as it means in english, inheriting features from parent(in programming features is normally functions and variables). Consider a class, `Animal` as shown, @@ -11,7 +12,7 @@ Consider a class, `Animal` as shown, public class Animal { public void bark() { - System.out.println("This is a animal"); + System.out.println("This is an animal"); } } @@ -36,7 +37,7 @@ Now whenever we do, ```java Animal animal = new Lion(); //creating instance of Animal, of type Lion -animal.bark(); + animal.bark(); ``` Note: Initialising the `Animal` class with `Lion`. diff --git a/exercises/concept/wizards-and-warriors/.docs/introduction.md b/exercises/concept/wizards-and-warriors/.docs/introduction.md index b6ca66535..ab8bb16c7 100644 --- a/exercises/concept/wizards-and-warriors/.docs/introduction.md +++ b/exercises/concept/wizards-and-warriors/.docs/introduction.md @@ -2,6 +2,8 @@ ## Inheritance +### Inheritance + Inheritance is a core concept in OOP (Object-Oriented Programming). It donates IS-A relationship. It literally means in programming as it means in english, inheriting features from parent(in programming features is normally functions and variables). @@ -37,7 +39,7 @@ Now whenever we do, ```java Animal animal = new Lion(); //creating instance of Animal, of type Lion -animal.bark(); + animal.bark(); ``` Note: Initialising the `Animal` class with `Lion`. From bcdba48599d5019a09bb01e5b49b731a213232c1 Mon Sep 17 00:00:00 2001 From: Sandro Micalizzi <149710478+smicaliz@users.noreply.github.com> Date: Tue, 28 Nov 2023 17:31:48 +0100 Subject: [PATCH 3/3] Fixed --- concepts/inheritance/introduction.md | 4 +--- exercises/concept/wizards-and-warriors/.docs/introduction.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/concepts/inheritance/introduction.md b/concepts/inheritance/introduction.md index b0b5cc780..0864dfa61 100644 --- a/concepts/inheritance/introduction.md +++ b/concepts/inheritance/introduction.md @@ -1,7 +1,5 @@ # Introduction -## Inheritance - Inheritance is a core concept in OOP (Object-Oriented Programming). It donates IS-A relationship. It literally means in programming as it means in english, inheriting features from parent(in programming features is normally functions and variables). @@ -37,7 +35,7 @@ Now whenever we do, ```java Animal animal = new Lion(); //creating instance of Animal, of type Lion - animal.bark(); +animal.bark(); ``` Note: Initialising the `Animal` class with `Lion`. diff --git a/exercises/concept/wizards-and-warriors/.docs/introduction.md b/exercises/concept/wizards-and-warriors/.docs/introduction.md index ab8bb16c7..b6ca66535 100644 --- a/exercises/concept/wizards-and-warriors/.docs/introduction.md +++ b/exercises/concept/wizards-and-warriors/.docs/introduction.md @@ -2,8 +2,6 @@ ## Inheritance -### Inheritance - Inheritance is a core concept in OOP (Object-Oriented Programming). It donates IS-A relationship. It literally means in programming as it means in english, inheriting features from parent(in programming features is normally functions and variables). @@ -39,7 +37,7 @@ Now whenever we do, ```java Animal animal = new Lion(); //creating instance of Animal, of type Lion - animal.bark(); +animal.bark(); ``` Note: Initialising the `Animal` class with `Lion`.