Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typos #2585

Merged
merged 3 commits into from Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions concepts/inheritance/introduction.md
Original file line number Diff line number Diff line change
@@ -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
This conversation was marked as resolved.
Show resolved Hide resolved

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,

Expand All @@ -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");
}

}
Expand All @@ -36,7 +37,7 @@ Now whenever we do,

```java
Animal animal = new Lion(); //creating instance of Animal, of type Lion
animal.bark();
animal.bark();
This conversation was marked as resolved.
Show resolved Hide resolved
```

Note: Initialising the `Animal` class with `Lion`.
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/wizards-and-warriors/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 6 additions & 5 deletions exercises/concept/wizards-and-warriors/.docs/introduction.md
This conversation was marked as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

## 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

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,

Expand All @@ -13,7 +14,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");
}

}
Expand All @@ -38,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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down