This commit is contained in:
DH10RBH 2024-04-15 09:50:39 +02:00
parent daa9ff1d9e
commit 9e27da7c8b
27 changed files with 182 additions and 0 deletions

29
Arbeitszreitrechner/.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
Arbeitszreitrechner/.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

6
Arbeitszreitrechner/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
Arbeitszreitrechner/.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Arbeitszreitrechner.iml" filepath="$PROJECT_DIR$/Arbeitszreitrechner.iml" />
</modules>
</component>
</project>

6
Arbeitszreitrechner/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,25 @@
public class Main {
public static void main(String[] args) {
// Konvertieren zu Stunden und Minuten
String[] zeitArray = eingabe.split(":");
int stunden = Integer.parseInt(zeitArray[0]);
int minuten = Integer.parseInt(zeitArray[1]);
// Berechnung der Arbeitszeiten
Calendar startZeit = Calendar.getInstance();
SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
startZeit.set(Calendar.HOUR_OF_DAY, stunden);
startZeit.set(Calendar.MINUTE, minuten);
Calendar arbeitszeit7h6Gehen = (Calendar) startZeit.clone();
arbeitszeit7h6Gehen.add(Calendar.MINUTE, (7 * 60) + 36 * 60); // 7,6 Stunden Arbeitszeit mit einer Stunde Pause (60 Minuten)
System.out.println("Mit einer Arbeitszeit von 7.6 Stunden gehst du um " + format.format(arbeitszeit7h6Gehen.getTime()) + " Uhr.");
Calendar arbeitszeit6hGehen = (Calendar) startZeit.clone();
arbeitszeit6hGehen.add(Calendar.MINUTE, (6 * 60) + 20); // 6 Stunden Arbeitszeit mit 20 Minuten Pause
System.out.println("Mit einer Arbeitszeit von 6 Stunden gehst du um " + format.format(arbeitszeit6hGehen.getTime()) + " Uhr.");
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

29
Kontrollstrukturen afg1/.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
Kontrollstrukturen afg1/.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

6
Kontrollstrukturen afg1/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Kontrollstrukturen afg1.iml" filepath="$PROJECT_DIR$/Kontrollstrukturen afg1.iml" />
</modules>
</component>
</project>

6
Kontrollstrukturen afg1/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,20 @@
public class Main {
public static void main(String[] args) {
int MAXIMUM;
MAXIMUM = 20;
for ( int i = 1; i < MAXIMUM; i++ ){
if (i %2 == 0) {
System.out.println(i);
}
}
for (int i = MAXIMUM; i > 1; i--) {
if (i %2 != 0) {
System.out.println(i);
}
}
}
}

View File

@ -0,0 +1 @@
Variablen und Ausdruecke afg3 & 4