How jjaros/java-oca-ocp-study works
Project Type and Purpose
• This is a Maven-based Java project that serves as a set of study materials and sample code for Oracle’s Java SE 8 certification exams (OCA and OCP).
• The study material is split between two categories (OCA and OCP), each broken down into chapters with sample classes and README files with supporting notes.
• There is also a documentation set (in the doc directory) with comprehensive notes (in ODT files) that complement the in-code comments.
Main Components from File Structure
• Project Root: Contains standard Maven files (.gitignore, pom.xml, _config.yml, README.md) which denote the project configuration.
• Documentation (doc): Contains summarized notes and reference documents (e.g., java_oca_cz_notes.odt, java_ocp_cz_notes.odt).
• Source Code (src/main/java): Organized in the package hierarchy “cz.jjaros.study”.
• Two major branches under this package are “oca” and “ocp” representing the two certification study areas.
• Each branch is subdivided into chapter folders (ch01_basics, ch02_varargs, etc. for OCA; ch01_classesobjects, ch02_generics, etc. for OCP).
• A “helper” package exists (src/main/java/cz/jjaros/study/helper) which contains utility classes (including exception classes and supporting methods) used across various examples.
• Resources (src/main/resources): Contains resource bundles (Messages.properties files) used, for example, for localization or other text output.
• “Project Root/Maven Core”: Represents configuration/build management with pom.xml, .gitignore, and _config.yml.
• “Source Code Module”: This is the largest section. Within it, create three sub-components:
• “OCA Examples”:
• “OCP Examples”:
• “Helper Utilities”:
• Represents the common support classes (Console, exception hierarchy, etc.) which are used across multiple example chapters.
b. Relationships and Interactions:
• In addition, indicate that “Resources” (Messages*.properties) are accessed by code at runtime, especially in output or configuration.
• “Documentation Module” with both “OCA Examples” and “OCP Examples” to show that the study notes supplement the code examples.
Architectural Patterns and Design Principles
• Modular design: The code is segmented by certification topics, encapsulating related examples in their own packages/folders.
• Separation of Concerns: There is a clear separation between the example code (in oca and ocp), the shared utilities (helper), and the documentation.
• Reusability: The helper classes (including exception handling utilities) are crafted to be used by multiple chapters.
• Self-contained Examples: Every example includes its own main method, promoting isolated testing and demonstration of concepts.
Elements
• Use clear labels for each component (e.g., “Maven Configuration”, “Documentation – OCA/OCP Notes”, “OCA Chapter: Basics”, “OCP Chapter: Generics”).
• Optionally, add brief notes near each component that mention major technologies or artifacts (e.g., Java SE 8, Maven, resource bundles).