How willydevelop/supermercado works
This is a Java Swing supermarket-management application. Its user workflow starts at the main window, opens product, customer, employee, or sales screens, and passes actions through controllers to a singleton service that manages in-memory catalog, customer, and employee data. Sales validate registered customers and stock, record purchases, and decrement inventory. Product subtypes implement category-specific pricing, promotions, and tax behavior; employee subtypes calculate salaries. The source index supports the main wiring, but several controller and UI bodies were not excerpted, so edges rely on indexed references or README descriptions.
Main entry points: SupermercadoService.java Supermarket service · CtrlPrincipal.java Navigation controller · UITheme.java UI theme · Main.java Application startup
Components 21
Desktop interface
- Main window
vista/FrmPrincipal.java - UI theme
vista/UITheme.java - Customer screen
vista/FrmCliente.java - Product screen
vista/FrmProducto.java - Employee screen
vista/FrmEmpleado.java - Sales screen
vista/FrmVenta.java
Application control
- Application startup
Main.java - Navigation controller
controlador/CtrlPrincipal.java - Customer controller
controlador/CtrlCliente.java - Product controller
controlador/CtrlProducto.java - Employee controller
controlador/CtrlEmpleado.java - Sales controller
controlador/CtrlVenta.java
Business domain
- Customer models
modelo/clientes/Cliente.java - Employee models
modelo/empleados/Empleado.java - Product models
modelo/productos/Producto.java - Product categories
modelo/productos/ProductoAlimenticio.java - Pricing contracts
modelo/interfaces/Promocionable.java - Sale exceptions
modelo/excepciones/ClienteNoRegistradoException.java
In-memory state
- Supermarket service
modelo/service/SupermercadoService.java - Sample data loader
modelo/util/CargaDatosPrueba.java
Other components
- Supermarket user
Connections 29
- Supermarket user → Main window: uses
Readme.md - Application startup → Supermarket service: initializes
Main.java - Application startup → Sample data loader: loads sample data
Main.java - Application startup → Main window: opens
Main.java - Main window → Navigation controller: routes actions
controlador/CtrlPrincipal.java - Navigation controller → Customer screen: opens
controlador/CtrlPrincipal.java - Navigation controller → Product screen: opens
controlador/CtrlPrincipal.java - Navigation controller → Employee screen: opens
controlador/CtrlPrincipal.java - Navigation controller → Sales screen: opens
controlador/CtrlPrincipal.java - Customer screen → Customer controller: submits actions
controlador/CtrlCliente.java - Product screen → Product controller: submits actions
vista/FrmProducto.java - Employee screen → Employee controller: submits actions
vista/FrmEmpleado.java - Sales screen → Sales controller: submits actions
vista/FrmVenta.java - Customer controller → Supermarket service: manages customers
controlador/CtrlCliente.java - Product controller → Supermarket service: manages products
controlador/CtrlProducto.java - Employee controller → Supermarket service: manages employees
controlador/CtrlEmpleado.java - Sales controller → Supermarket service: registers purchases
controlador/CtrlVenta.java - Supermarket service → Customer models: records purchases
modelo/service/SupermercadoService.java - Supermarket service → Product models: checks stock
modelo/service/SupermercadoService.java - Supermarket service → Sale exceptions: throws validation errors
modelo/service/SupermercadoService.java - Supermarket service → Employee models: stores employees
modelo/service/SupermercadoService.java - Supermarket service → Product categories: stores products
modelo/service/SupermercadoService.java - Product categories → Product models: extends
modelo/productos/ProductoAlimenticio.java - Product categories → Pricing contracts: implements promotions
modelo/productos/ProductoAlimenticio.java - Employee models → Employee models: specializes roles
modelo/empleados/Empleado.java - Customer screen → UI theme: uses styling
vista/FrmCliente.java - Employee screen → UI theme: uses styling
vista/FrmEmpleado.java - Product screen → UI theme: uses styling
vista/FrmProducto.java - Sales screen → UI theme: uses styling
vista/FrmVenta.java