From 57f404cf9e15b11c12c81a0766317a7e4b5c4449 Mon Sep 17 00:00:00 2001 From: Bohdan Chupika Date: Thu, 12 Oct 2023 14:39:07 +0300 Subject: [PATCH] update checklist.md reference (#1715) --- README.md | 10 +++++----- checklist.md | 12 ++++++------ pom.xml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 877cc9f6e..6d23842d8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # jv-oop - Create class Machine containing methods `public abstract void doWork()` and `public abstract void stopWork()`. -- Create classes `Truck`, `Bulldozer`, `Excavator` that will inherit from `Machine`. -- In those classes override `doWork()`, so it will print message that certain machine started its work. -- Override `stopWork()` as well. It should print messages that certain machine stopped its work. -- In `MainApp` class create `Machine` array with `Truck`, `Bulldozer` and `Excavator` and call methods `doWork()` and `stopWork()` in a loop. +- Create classes `Truck`, `Bulldozer`, and `Excavator` that will inherit from `Machine`. +- In those classes override `doWork()`, so it will print a message that a certain machine started its work. +- Override `stopWork()` as well. It should print messages that certain machines stopped working. +- In the `MainApp` class create a `Machine` array with `Truck`, `Bulldozer`, and `Excavator` and call methods `doWork()` and `stopWork()` in a loop. -#### [Try to avoid these common mistakes, while solving task](https://mate-academy.github.io/jv-program-common-mistakes/java-core/oop/oop) +#### [Try to avoid these common mistakes, while solving task](./checklist.md) diff --git a/checklist.md b/checklist.md index 46121f865..a8c04e5a2 100644 --- a/checklist.md +++ b/checklist.md @@ -22,17 +22,17 @@ public class Main { ``` #### Write informative messages in methods. -Use english only and make them informative: -message should indicate what type of `Machine` is working right now `Truck`, `Bulldozer` or `Excavator`. +- Use English only and make messages informative +- The message should indicate what type of `Machine` is working right now `Truck`, `Bulldozer` or `Excavator`. -#### Use abstract reference instead of specific one where possible: +#### Use abstract references instead of specific ones where possible: * Bad example: ``` Cat fluffy = new Cat(); Dog oscar = new Dog(); ``` This example is bad cause it won't allow us to use polymorphism in our code. -Our reference is now bonded to specific implementation, but it is always better to depend on the abstraction. +Our reference is now bonded to a specific implementation, but it is always better to depend on the abstraction. Let's see how we can improve it: * Improved example: ``` @@ -42,8 +42,8 @@ Animal oscar = new Dog(); #### Depending on the case, class elements should have different access modifiers Remember that if you don't use any access modifiers that will apply the default one. Do we always want -to have all elements with default access modifiers? Remind yourself about encapsulation principle and +to have all elements with default access modifiers? Remind yourself about the encapsulation principle and when private or public should be used. #### Write informative messages when you commit code or open a PR. -Bad example of commit/PR message: `done`/`fixed`/`commit`/`solution`/`added homework`/`my solution` and other one-word, abstract or random messages. +Bad examples of commit/PR messages: `done`/`fixed`/`commit`/`solution`/`added homework`/`my solution` and other one-word, abstract or random messages. diff --git a/pom.xml b/pom.xml index 7c3d3f035..617dbe04f 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.1 + 3.3.0 compile