update solid ex

This commit is contained in:
Loredana 2019-02-10 18:24:45 +02:00
parent a98aedd25b
commit 68ea49996b
23 changed files with 19 additions and 16 deletions

View File

@ -17,6 +17,7 @@
<module>front-controller</module> <module>front-controller</module>
<module>intercepting-filter</module> <module>intercepting-filter</module>
<module>design-patterns</module> <module>design-patterns</module>
<module>solid</module>
</modules> </modules>
<dependencyManagement> <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"> 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> <modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<artifactId>solid/artifactId> <artifactId>solid</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<dependencies> <parent>
<!-- https://mvnrepository.com/artifact/junit/junit --> <groupId>com.baeldung</groupId>
<dependency> <artifactId>patterns</artifactId>
<groupId>junit</groupId> <version>1.0.0-SNAPSHOT</version>
<artifactId>junit</artifactId> <relativePath>..</relativePath>
<version>4.12</version> </parent>
<scope>test</scope>
</dependency>
</dependencies>
</project> </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 { public class Windows98Machine {
private final Keyboard keyboard; private final StandardKeyboard keyboard;
private final Monitor monitor; private final Monitor monitor;
public Windows98Machine() { public Windows98Machine() {
monitor = new Monitor(); monitor = new Monitor();
keyboard = new Keyboard(); keyboard = new StandardKeyboard();
} }