How tomas-dorado/examen_1 works
Main Components
• Punto Module (Punto.py): Represents the “Point” entity. Document key methods such as the constructor, cuadrante, vector, distancia, and the string representation.
• Rectangulo Module (Rectangulo.py): Represents the “Rectangle” entity. Include its constructor, methods for base, altura, area, and its custom string representation.
• Main Driver (main.py): Acts as the entry point that instantiates and uses the Punto and Rectangulo classes, demonstrating their functionalities.
Relationships and Interactions
• The main.py module depends on both the Punto and Rectangulo modules.
• The Rectangulo class uses two Punto objects (punto_inicial and punto_final) to define its geometry.
• Data flows from main.py where Punto instances are created and then passed to the Rectangulo class for geometric calculations.
• The methods of both classes (for instance, calculating distances, vectors, and determining the quadrant) are used to compute and output results.
Architectural Patterns and Principles
• Object-Oriented Design: Emphasize the encapsulation of behavior and data in the Punto and Rectangulo classes.
• Demonstration of basic class relationships: Show composition where a Rectangulo is composed of two Punto objects.
Relevant Technologies and Libraries
• Python is the primary programming language.