Skip to content

Commit

Permalink
Nowa klasa Main
Browse files Browse the repository at this point in the history
  • Loading branch information
Leszek186 committed Oct 30, 2024
1 parent 7f73050 commit d7c6a18
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* @(#)<main.Java.java <project-version> <2024/10/30>
*
* <Task management application>
*
* Built using <IntelliJ> IDE Version: <2023.2.5>
* OpenJDK Runtime Environment <OpenJDK>-<17.0.9>
*
*/

// Remaining code
import java.util.Scanner;

public class Main {

Check warning on line 14 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 Missing a Javadoc comment. Raw Output: /github/workspace/./src/Main.java:14:1: warning: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck)
// Definiowanie klasy
public static class Pracownik {

Check warning on line 16 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 'class def modifier' has incorrect indentation level 4, expected level should be 2. Raw Output: /github/workspace/./src/Main.java:16:5: warning: 'class def modifier' has incorrect indentation level 4, expected level should be 2. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)

Check warning on line 16 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 Missing a Javadoc comment. Raw Output: /github/workspace/./src/Main.java:16:5: warning: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck)
// Atrybuty
String imie;

Check warning on line 18 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 'member def type' has incorrect indentation level 8, expected level should be 4. Raw Output: /github/workspace/./src/Main.java:18:9: warning: 'member def type' has incorrect indentation level 8, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
String nazwisko;

Check warning on line 19 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 'member def type' has incorrect indentation level 8, expected level should be 4. Raw Output: /github/workspace/./src/Main.java:19:9: warning: 'member def type' has incorrect indentation level 8, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
String stanowisko;

Check warning on line 20 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 'member def type' has incorrect indentation level 8, expected level should be 4. Raw Output: /github/workspace/./src/Main.java:20:9: warning: 'member def type' has incorrect indentation level 8, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)

// Metoda
void pracuj() {

Check warning on line 23 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 'method def modifier' has incorrect indentation level 8, expected level should be 4. Raw Output: /github/workspace/./src/Main.java:23:9: warning: 'method def modifier' has incorrect indentation level 8, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
System.out.println(imie + " " + nazwisko + " pracuje na stanowisku " + stanowisko + ".");

Check warning on line 24 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 Line is longer than 100 characters (found 101). Raw Output: /github/workspace/./src/Main.java:24:0: warning: Line is longer than 100 characters (found 101). (com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck)

Check warning on line 24 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 'method def' child has incorrect indentation level 12, expected level should be 6. Raw Output: /github/workspace/./src/Main.java:24:13: warning: 'method def' child has incorrect indentation level 12, expected level should be 6. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
}

Check warning on line 25 in src/Main.java

View workflow job for this annotation

GitHub Actions / java-linter

[reviewdog] reported by reviewdog 🐶 'method def rcurly' has incorrect indentation level 8, expected level should be 4. Raw Output: /github/workspace/./src/Main.java:25:9: warning: 'method def rcurly' has incorrect indentation level 8, expected level should be 4. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)
}

// Użycie klasy
public static void main(String[] args) {
// Tworzenie obiektów (instancji) klasy Pracownik
Pracownik pracus1 = new Pracownik();
pracus1.imie = "Jan";
pracus1.nazwisko = "Kowalski";
pracus1.stanowisko = "Programista";

Pracownik pracus2 = new Pracownik();
pracus2.imie = "Anna";
pracus2.nazwisko = "Nowak";
pracus2.stanowisko = "Tester";

// Wywoływanie metody
pracus1.pracuj(); // "Jan Kowalski pracuje na stanowisku Programista."
pracus2.pracuj(); // "Anna Nowak pracuje na stanowisku Tester."
}
}

0 comments on commit d7c6a18

Please sign in to comment.