first commit

This commit is contained in:
happymeal2024 2025-05-11 11:12:47 +02:00
commit 36337ccd80
21 changed files with 332 additions and 0 deletions

3
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

13
.idea/compiler.xml generated Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="speaker" />
</profile>
</annotationProcessing>
</component>
</project>

7
.idea/encodings.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

20
.idea/jarRepositories.xml generated Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

12
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_23" default="true" project-jdk-name="temurin-23" project-jdk-type="JavaSDK" />
</project>

6
.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>

0
.mvn/jvm.config Normal file
View File

0
.mvn/maven.config Normal file
View File

81
pom.xml Normal file
View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.vimo</groupId>
<artifactId>speaker</artifactId>
<version>1.0-SNAPSHOT</version>
<name>speaker</name>
<description>A simple speaker.</description>
<!-- FIXME mic change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock123 down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.6.1</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
</plugin>
</plugins>
</reporting>
</project>

View File

@ -0,0 +1,4 @@
package de.vimo;
public class BluetoothMouse {
}

View File

@ -0,0 +1,7 @@
package de.vimo;
public class BluetoothMouseApp {
public static void main(String[] args) {
BluetoothMouse tecknetMouse = new BluetoothMouse();
}
}

View File

@ -0,0 +1,14 @@
package de.vimo;
public class FieldOven {
private SizeOfField sizeOfField;
private int position;
public FieldOven() {
}
public SizeOfField getSizeOfField() {
return sizeOfField;
}
}

View File

@ -0,0 +1,18 @@
package de.vimo;
public class Oven {
private FieldOven[] fieldOvens;
public Oven() {
fieldOvens = new FieldOven[4];
}
public void initializeOven() {
fieldOvens[0]
}
public void turnOn(FieldOven fieldOven) {
}
}

View File

@ -0,0 +1,9 @@
package de.vimo;
public class OvenApp {
public static void main(String[] args) {
Oven siemensOven = new Oven();
siemensOven.turnOn(fieldDownLeft);
siemensOven.setField(fieldDownLeft, 3);
}
}

View File

@ -0,0 +1,6 @@
package de.vimo;
public enum SizeOfField {
SMALL_CIRCLE, STANDARD_CIRCLE, BIG_CIRCLE, STANDARD_EXTENSION_CIRCLE
}

View File

@ -0,0 +1,41 @@
package de.vimo;
public class Speaker {
private boolean isPowerButtonOn;
private boolean isBluetoothButtonOn;
private int soundLevel;
public Speaker() {
isPowerButtonOn = false;
isBluetoothButtonOn = false;
soundLevel = 0;
}
public void turnOnSpeaker() {
isPowerButtonOn = true;
}
public void connectBluetooth() {
isBluetoothButtonOn = true;
}
public void increaseSoundVolume(int incrementLevel) {
this.soundLevel = soundLevel + incrementLevel;
}
public void decreaseSoundVolume(int decrementLevel) {
this.soundLevel = soundLevel - decrementLevel;
}
public int getSoundLevel() {
return soundLevel;
}
public String displaySpeaker() {
String result = "Power is " + isPowerButtonOn +
" Bluetooth is connected " + isBluetoothButtonOn +
" current Soundlevel is " + getSoundLevel();
return result;
}
}

View File

@ -0,0 +1,15 @@
package de.vimo;
public class SpeakerApp
{
public static void main( String[] args )
{
Speaker speakerSony = new Speaker();
speakerSony.turnOnSpeaker();
speakerSony.connectBluetooth();
speakerSony.increaseSoundVolume(4);
speakerSony.decreaseSoundVolume(3);
System.out.println(speakerSony.displaySpeaker());
}
}

View File

@ -0,0 +1,4 @@
package de.vimo;
public class Stove {
}

View File

@ -0,0 +1,8 @@
package de.vimo;
public class StoveApp {
public static void main(String[] args) {
Stove siemensStove = new Stove();
}
}

26
src/site/site.xml Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="speaker" xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd">
<bannerLeft>
<name>speaker</name>
<src>https://maven.apache.org/images/apache-maven-project.png</src>
<href>https://www.apache.org/</href>
</bannerLeft>
<bannerRight>
<src>https://maven.apache.org/images/maven-logo-black-on-white.png</src>
<href>https://maven.apache.org/</href>
</bannerRight>
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
<version>1.7</version>
</skin>
<body>
<menu ref="parent" />
<menu ref="reports" />
</body>
</project>

View File

@ -0,0 +1,38 @@
package de.vimo;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}