The Course Management panel (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kenri89/PROYECTO_UTP_AED_1_1/llms.txt
Use this file to discover all available pages before exploring further.
PanelCursos) is available to users with the Administrator (admin) and Secretary (secretaria) roles. It provides the full academic course catalog — registration, search, update, deletion, and Excel export. What makes this module architecturally distinctive is that every course is maintained simultaneously in three separate in-memory data structures, each optimised for a different usage pattern, all backed by CursoDAO for SQL Server persistence.
The Curso Data Model
Each course record holds four fields. codigo is the unique primary key used to identify courses across all three structures.
| Field | Type | Description | Constraint |
|---|---|---|---|
codigo | String | Unique course code — acts as the primary key. | Non-null (Guava checkNotNull) |
nombre | String | Full course name. | Non-null |
creditos | int | Credit value of the course. | ≥ 0 (constructor); > 0 (setter via checkArgument) |
semestre | int | Academic semester this course belongs to. | 1 – 10 (Guava checkArgument) |
Three Parallel Data Structures
Courses are stored in all three structures at the same time. Each structure serves a distinct role:ArregloCursos
A fixed-capacity array (default 100, auto-resizes by doubling). Used for index-based access, table rendering, and Excel export via
obtenerCursos(). Supports buscar(codigo) by linear scan and eliminarPorCodigo(codigo) by shifting.ListaCursos
A singly-linked list. Used for combo-box population in the enrollment panel (
recorrer(Consumer<Curso>)) and for buscar(codigo) lookups during enrollment creation. Traversal visits nodes in insertion order.MatrizSemestres
A 10 × 10 two-dimensional array (
Curso[10][10]). Row index = semestre - 1. Used for semester-grouped views. Each row holds up to 10 courses per semester. insertarPorSemestre(curso) finds the first null slot in the correct row.cargarDatosDesdeSQL() calls limpiar() on all three structures and re-inserts every course returned by CursoDAO.listar():
CRUD Operations
Register a New Course
Fill in Código, Nombre, Créditos (integer), and select a Semestre (1–10) from the combo-box. Click Agregar Curso.The panel parses
creditos and calls CursoDAO.insertar(codigo, nombre, creditos, semestre). On success it reloads all three structures via cargarDatosDesdeSQL().Search by Code
Direct lookup on
ArregloCursos uses a linear scan comparing codigo case-insensitively:ListaCursos.buscar(codigo) provides the same search for the enrollment panel when resolving a course by code during matriculation.Update a Course
Right-click any row in the table and choose Actualizar from the context menu. The row data is loaded into the form; the Código field is disabled to prevent key changes. Modify Nombre, Créditos, and/or Semestre, then click Actualizar Curso.The panel calls
CursoDAO.actualizar(codigo, nombre, creditos, semestre) and refreshes all three structures. If the semestre changes, MatrizSemestres.actualizarCurso() moves the course to the new row automatically.Semester Constraints
Thesemestre field is validated at both the model layer (Guava checkArgument) and implicitly by the UI (the combo-box is pre-populated with values 1–10 only). The MatrizSemestres maps semestre to a zero-based row index:
false — a warning dialog should be added in a future version.
Excel Export
Click Exportar a Excel in the toolbar. A file-chooser opens, defaulting tocursos.xls. The export calls:
arregloCursos.obtenerCursos() and writes an HSSFWorkbook with four columns:
| Column A | Column B | Column C | Column D |
|---|---|---|---|
| Código | Nombre | Créditos | Semestre |