This commit is contained in:
Mykola Fesenko
2025-07-29 08:08:23 +02:00
commit 899a05907b
355 changed files with 11002 additions and 0 deletions

2
4/.gitingore Normal file
View File

@@ -0,0 +1,2 @@
*.class
*.~ava

BIN
4/A2.class Normal file

Binary file not shown.

19
4/A2.java Normal file
View File

@@ -0,0 +1,19 @@
import java.util.Arrays;
public class A2 {
public static void main(String args[]) {
int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78 } ;
for (int zahl: zahlen ) {
System.out.println( zahl);
} // end of for
System.out.println(Arrays.toString(zahlen));
Arrays.sort(zahlen);
for (int zahl: zahlen ) {
System.out.println( zahl);
}
System.out.println(Arrays.toString(zahlen));
}
}

18
4/A2.~ava Normal file
View File

@@ -0,0 +1,18 @@
import java.util.Arrays;
public class A2 {
public static void main(String args[]) {
int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78 } ;
for (int zahl: zahlen ) {
System.out.println( zahl);
} // end of for
System.out.println(Arrays.toString(zahlen));
Arrays.sort(zahlen);
for (int zahl: zahlen ) {
System.out.println( zahl);
}
}
}

BIN
4/A4.class Normal file

Binary file not shown.

25
4/A4.java Normal file
View File

@@ -0,0 +1,25 @@
import java.util.Arrays;
import java.util.Scanner;
public class A4 {
public static void main(String args[]) {
double schueler[] = new double[5];
Scanner input = new Scanner(System.in);
for (int i = 0; i < schueler.length;i++ ) {
System.out.print((i+1) + ". ");
schueler[i] = input.nextDouble();
}
Arrays.sort(schueler);
for (int i = 0; i < schueler.length;i++ ) {
System.out.println((i+1)+". " + schueler[i]);
}
double durschnittlich = 0;
for (int i = 0; i < schueler.length;i++ ) {
durschnittlich += schueler[i];
}
System.out.println("Durschnittlich: " + (Math.round((durschnittlich/schueler.length) *10.0 )/10.0 ) );
}
}

25
4/A4.~ava Normal file
View File

@@ -0,0 +1,25 @@
import java.util.Arrays;
import java.util.Scanner;
public class A4 {
public static void main(String args[]) {
double schueler[] = new double[18];
Scanner input = new Scanner(System.in);
for (int i = 0; i < schueler.length;i++ ) {
System.out.print((i+1) + ". ");
schueler[i] = input.nextDouble();
}
Arrays.sort(schueler);
for (int i = 0; i < schueler.length;i++ ) {
System.out.println((i+1)+". " + schueler[i]);
}
double durschnittlich = 0;
for (int i = 0; i < schueler.length;i++ ) {
durschnittlich += schueler[i];
}
System.out.println("Durschnittlich: " + (Math.round((durschnittlich/schueler.length) *10.0 )/10.0 ) );
}
}

BIN
4/Array1.class Normal file

Binary file not shown.

10
4/Array1.java Normal file
View File

@@ -0,0 +1,10 @@
import java.util.Arrays;
public class Array1{
public static void main(String args[]){
int lottozahlen[] = {17, 9, 39, 23, 41, 6};
System.out.println("Anzahl Elemente im Array: " + lottozahlen.length);
System.out.println("Komplettes Array: " + Arrays.toString(lottozahlen));
Arrays.sort(lottozahlen);
System.out.println("Komplettes Array: " + Arrays.toString(lottozahlen));
}
}

21
4/Array1.~ava Normal file
View File

@@ -0,0 +1,21 @@
import java.util.Arrays;
public class Array1 {
public static void main(String args[]) {
import java.util.Arrays;
public class lottoArray{
public static void main(String args[]){
int lottozahlen[] = {17, 9, 39, 23, 41, 6};
System.out.println("Anzahl Elemente im Array: " + lottozahlen.length);
System.out.println("Komplettes Array: " + Arrays.toString(lottozahlen));
Arrays.sort(lottozahlen);
System.out.println("Komplettes Array: " + Arrays.toString(lottozahlen));
}
}
}
public static void striechen() {
for (int i = 0; i < 50; i++) {
System.out.print("-");
}
System.out.println();
}
}

BIN
4/KG1.class Normal file

Binary file not shown.

14
4/KG1.java Normal file
View File

@@ -0,0 +1,14 @@
import java.util.Arrays;
public class KG1 {
public static void main(String args[]) {
int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78, 66,73,4,56,3,643,5,23,6,300 } ;
Arrays.sort(zahlen);
System.out.println("Kleinste: "+ zahlen[0]);
System.out.println("Großte: "+ zahlen[zahlen.length -1]);
}
}

13
4/KG1.~ava Normal file
View File

@@ -0,0 +1,13 @@
import java.util.Arrays;
public class KG1 {
public static void main(String args[]) {
int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78, 66,73,4,56,3,643,5,23,6,300 } ;
Arrays.sort(zahlen);
System.out.println("Kleinste: "+ zahlen[0]);
System.out.println("Großte: "+ zahlen[zahlen.length -1]);
}
}

BIN
4/KG2.class Normal file

Binary file not shown.

28
4/KG2.java Normal file
View File

@@ -0,0 +1,28 @@
import java.util.Arrays;
public class KG2 {
public static void main(String args[]) {
int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78, 66,73,4,56,3,643,5,23,6,300 };
int grosste = 0;
int kleinste = 0;
for (int i = 0; i < zahlen.length;i++ ) {
if(zahlen[i] > grosste) {
grosste = zahlen[i];
}
}
kleinste = grosste;
for (int i = 0; i < zahlen.length;i++ ) {
if(zahlen[i] < kleinste) {
kleinste = zahlen[i];
}
}
System.out.println("Kleinste: "+ kleinste);
System.out.println("Großte: "+ grosste);
}
}

28
4/KG2.~ava Normal file
View File

@@ -0,0 +1,28 @@
import java.util.Arrays;
public class KG2 {
public static void main(String args[]) {
int zahlen[] = {13, 9, 67, 42, 101, 99, 97, 112, 83, 5, 78, 66,73,4,56,3,643,5,23,6 };
int grosste = 0;
int kleinste = 0;
for (int i = 0; i < zahlen.length;i++ ) {
if(zahlen[i] > grosste) {
grosste = zahlen[i];
}
}
kleinste = grosste;
for (int i = 0; i < zahlen.length;i++ ) {
if(zahlen[i] < kleinste) {
kleinste = zahlen[i];
}
}
System.out.println("Kleinste: "+ kleinste);
System.out.println("Großte: "+ grosste);
}
}

0
4/error.txt Normal file
View File

BIN
4/o.class Normal file

Binary file not shown.

26
4/o.java Normal file
View File

@@ -0,0 +1,26 @@
/**
*
* Beschreibung
*
* @version 1.0 vom 11.12.2024
* @author
*/
public class o {
// Anfang Attribute
// Ende Attribute
// Anfang Methoden
public void jj() {
// TODO hier Quelltext einfügen
}
public void ll() {
// TODO hier Quelltext einfügen
}
// Ende Methoden
} // end of o

27
4/o.uml Normal file
View File

@@ -0,0 +1,27 @@
[Files]
File0=o.java
[Box: - o]
X=20
Y=40
MinVis=0
ShowParameter=4
SortOrder=0
ShowIcons=1
[Diagram]
comments=0
OffsetX=0
OffsetY=0
Visibility=0
ShowParameter=4
SortOrder=0
ShowIcons=1
ShowConnections=0
Fontname=Segoe UI
Fontsize=12
ShowObjectDiagram=0
[Interactive]
I0=