How sergiescriva/ejercicios_3ev works
Main Components
• A central “src” module that contains all the source code.
• Sub-modules/packages representing exercise domains:
– Competi: likely contains competitive coding examples (e.g. array challenges, problems).
– Iterable: exercises using iterable collections (e.g., classes like Alumno, Clase, Pila).
– List: examples that work with lists and queues, CSV file interactions, and random number generation.
– Map: exercises demonstrating the use of maps with examples such as ContadorPalabras, Empleado, Empresa.
– Comparadores: module dedicated to comparator logic and sorting with different attributes.
– Control_acceso: dealing with access control examples (with CSV-based user access).
– Enums: exercises using enumerations to model domain concepts like playing cards and game states.
– Practica: likely dedicated to practice exercises like printing pages.
– Retos: challenge exercises such as those involving resistance calculations and number problems.
• An external “Test” component, implicit in the use of TestNG within the code (especially for MATRICAD and VOCALS).
• Configuration and project setup elements (e.g., the NetBeans project files like .iml, .idea folder, .gitignore).
Relationships and Interactions
• Although each exercise module is largely independent, they share common Java frameworks and testing methodologies.
• The “MATRICAD”, “VOCALS”, and “EMPLEAT” exercises are designed to have thorough unit tests with multiple test cases (as described in the README). This illustrates the integration of application logic with a testing framework.
• Some exercises use common CSV files (e.g., ListaAlumnos.csv in “List” and “comparadores”) indicating potential shared data or similarity in test case setup.
• Flow in each exercise: input data (hardcoded or via CSV) → business logic (methods implementing the exercise requirements) → testing (with TestNG, using setup and teardown methods for structuring test cases).
Architectural Patterns and Design Principles
• Modularization: Each exercise or concept is separated into its corresponding package, keeping concerns isolated.
• Use of JavaDoc for inline documentation explaining design decisions (e.g., equivalence partitioning for test cases).
• Incorporation of unit testing as a core part of the development, using TestNG’s annotations (@BeforeClass, @Test, etc.) which is a best practice in TDD (Test-Driven Development).
• Exception handling is deliberately designed (e.g., through custom “MaException” usage) to manage error cases in business logic.
• The project is set-up so it can be easily managed in an IDE like NetBeans, which hints at a well-segregated structure between code and configuration.
Relevant Technologies and Frameworks
• Java (the core programming language).
• TestNG as the testing framework.
• NetBeans IDE (suggested by the README and project configuration files like Ejercicios_3Ev.iml and .idea folder).
• Basic CSV file handling for data input in some modules.