From da3b919140f35f9804dcfc38653be1ef8850ad56 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Thu, 12 Oct 2023 13:12:18 +0200 Subject: [PATCH] Even More OOP - Added --- OOP/even_more_oop/EvenMoreOOP/.gitignore | 1 + OOP/even_more_oop/EvenMoreOOP/pom.xml | 81 +++++++++++++++++++ .../main/java/ocp/oop/EvenMoreOOP/App.java | 38 +++++++++ .../EvenMoreOOP/src/site/site.xml | 26 ++++++ .../java/ocp/oop/EvenMoreOOP/AppTest.java | 38 +++++++++ 5 files changed, 184 insertions(+) create mode 100644 OOP/even_more_oop/EvenMoreOOP/.gitignore create mode 100644 OOP/even_more_oop/EvenMoreOOP/pom.xml create mode 100644 OOP/even_more_oop/EvenMoreOOP/src/main/java/ocp/oop/EvenMoreOOP/App.java create mode 100644 OOP/even_more_oop/EvenMoreOOP/src/site/site.xml create mode 100644 OOP/even_more_oop/EvenMoreOOP/src/test/java/ocp/oop/EvenMoreOOP/AppTest.java diff --git a/OOP/even_more_oop/EvenMoreOOP/.gitignore b/OOP/even_more_oop/EvenMoreOOP/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/OOP/even_more_oop/EvenMoreOOP/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/OOP/even_more_oop/EvenMoreOOP/pom.xml b/OOP/even_more_oop/EvenMoreOOP/pom.xml new file mode 100644 index 0000000..12a0c52 --- /dev/null +++ b/OOP/even_more_oop/EvenMoreOOP/pom.xml @@ -0,0 +1,81 @@ + + + + 4.0.0 + + ocp.oop + EvenMoreOOP + 0.0.1-SNAPSHOT + + EvenMoreOOP + A simple EvenMoreOOP. + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 3.8.1 + + + + + + + + maven-clean-plugin + 3.1.0 + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + + + + + + maven-project-info-reports-plugin + + + + diff --git a/OOP/even_more_oop/EvenMoreOOP/src/main/java/ocp/oop/EvenMoreOOP/App.java b/OOP/even_more_oop/EvenMoreOOP/src/main/java/ocp/oop/EvenMoreOOP/App.java new file mode 100644 index 0000000..b6c06ca --- /dev/null +++ b/OOP/even_more_oop/EvenMoreOOP/src/main/java/ocp/oop/EvenMoreOOP/App.java @@ -0,0 +1,38 @@ +package ocp.oop.EvenMoreOOP; + +/** + * Just testing some things out + * + */ +public class App +{ + public class A + { + + } + + public static class B + { + + } + + public static void main(String[] args) + { + class C + { + + }; + + App app = new App(); + + // Non-static class must be accessed via a nn-static way (object instance) + app.new A(); + new App().new A(); + + // B MUST (not "can") as a static instance explicit top-class or not + new App.B(); +// app.new B(); + new B(); + new C(); + } +} diff --git a/OOP/even_more_oop/EvenMoreOOP/src/site/site.xml b/OOP/even_more_oop/EvenMoreOOP/src/site/site.xml new file mode 100644 index 0000000..98a53f9 --- /dev/null +++ b/OOP/even_more_oop/EvenMoreOOP/src/site/site.xml @@ -0,0 +1,26 @@ + + + + + EvenMoreOOP + https://maven.apache.org/images/apache-maven-project.png + https://www.apache.org/ + + + + https://maven.apache.org/images/maven-logo-black-on-white.png + https://maven.apache.org/ + + + + org.apache.maven.skins + maven-fluido-skin + 1.7 + + + + + + + \ No newline at end of file diff --git a/OOP/even_more_oop/EvenMoreOOP/src/test/java/ocp/oop/EvenMoreOOP/AppTest.java b/OOP/even_more_oop/EvenMoreOOP/src/test/java/ocp/oop/EvenMoreOOP/AppTest.java new file mode 100644 index 0000000..a396c8d --- /dev/null +++ b/OOP/even_more_oop/EvenMoreOOP/src/test/java/ocp/oop/EvenMoreOOP/AppTest.java @@ -0,0 +1,38 @@ +package ocp.oop.EvenMoreOOP; + +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 ); + } +}