Merge pull request #6309 from eugenp/BAEL-2585-v

update solid ex
This commit is contained in:
Loredana Crusoveanu 2019-02-10 18:29:25 +02:00 committed by GitHub
commit 995110cee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 19 additions and 16 deletions

View File

@ -17,6 +17,7 @@
<module>front-controller</module>
<module>intercepting-filter</module>
<module>design-patterns</module>
<module>solid</module>
</modules>
<dependencyManagement>

View File

@ -1,4 +0,0 @@
package com.baeldung.d;
public class Keyboard {
}

View File

@ -4,17 +4,14 @@
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>com.baeldung</groupId>
<artifactId>solid/artifactId>
<artifactId>solid</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<parent>
<groupId>com.baeldung</groupId>
<artifactId>patterns</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
</project>

View File

@ -0,0 +1,4 @@
package com.baeldung.d;
public interface Keyboard {
}

View File

@ -0,0 +1,5 @@
package com.baeldung.d;
public class StandardKeyboard implements Keyboard {
}

View File

@ -2,13 +2,13 @@ package com.baeldung.d;
public class Windows98Machine {
private final Keyboard keyboard;
private final StandardKeyboard keyboard;
private final Monitor monitor;
public Windows98Machine() {
monitor = new Monitor();
keyboard = new Keyboard();
keyboard = new StandardKeyboard();
}