You are on page 1of 17

1.

REQUISITOS
uc GestionarEmpleado

GestionarEmpleado

User (from Actors)

CU1 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor 1. Solicitud Crear Empleado 2. Solicitar Editar Empleado 3. Solicitar Eliminar Empleado 4. Buscar datos de un Empleado

GESTIONAR EMPLEADO Este CU es el encargado de Crear, Eliminar, Editar, Buscar un Empleado Administrador Administrador El Administrador del sistema tiene el privilegio de registrar empleados Una vez un empleado esta registrado est habilitado para realizar una venta y/o realizar la recepcin de algn producto Respuesta del Sistema 1.1. Si el Distribuidor no est registrado y los datos ingresados son correctos se crea el Empleado 2.1. Se debe ingresar correctamente el cdigo del Empleado entonces se modificaran los datos 3.1. Se debe ingresar correctamente el cdigo del Empleado y se eliminara 4.1. Se debe colocar el nombre y/o el cdigo del Empleado entonces devolver los datos de dicho Empleado

CAMINO ALTERNO 5. No se pudo obtener conexion y/o error al cargar los datos

uc Gestionar Producto

GestionarProducto

Pg. 1
User (from Actors)

CU2 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor
1. Solicitud Crear

GESTIONAR PRODUCTO Este CU es el encargado de Crear, Editar, Eliminar, Buscar Productos User(Adm,empleado) User(Adm,empleado) Tiene que existir marca y presentacin para dicho producto Una vez registrados los productos se puede hacer la venta y/o recepcion de dicho producto Respuesta del Sistema
1.2. Si el producto no est registrado y los datos ingresados

Producto 2. Solicitar Editar Producto 3. Solicitar Marca Producto 4. Buscar datos de un Producto

son correctos se crea el Producto 2.1. Se debe ingresar correctamente el cdigo del Producto entonces se modificaran los datos 3.1. Se debe ingresar correctamente el cdigo del Producto y se eliminara 4.1. Se debe colocar el nombre y/o el cdigo del Producto entonces devolver los datos de dicho Producto

CAMINO ALTERNO 5. No se pudo obtener conexion y/o error al cargar los datos

uc GestionarDistribuidora

GestionarDistrinuidora

Pg. 2

Distribuidor (from Actors)

CU3 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor 1. Solicitud Crear Distribuidor 2. Solicitar Editar Distribuidor 3. Solicitar Eliminar Distribuidor 4. Buscar datos de un Distribuidor

GESTIONAR DISTRIBUIDORA Este CU es el encargado de Crear, Eliminar, Editar, Datos de las distribuidoras que entregan pedidos Distribuidor Distribuidor Una vez creada los datos de la distribuidora se procede a establecer la marca de los productos que entrega ademas se habilita para poder recepcionar productos de ella. Respuesta del Sistema
1.3. Si el Distribuidor no est registrado y los datos ingresados son correctos se crea el Distribuidor

2.1. Se debe ingresar correctamente el cdigo del Distribuidor entonces se modificaran los datos 3.1. Se debe ingresar correctamente el cdigo del Distribuidor y se eliminara 4.1. Se debe colocar el nombre y/o el cdigo del Distribuidor entonces devolver los datos de dicho Distribuidor

CAMINO ALTERNO
5. No se pudo obtener conexion y/o error al cargar los datos

uc GestionarEntrega

GestionarEntrega Distribuidor (from Actors)

Pg. 3

CU4 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor 1. Se debe identificar el distribuidor 2. Se debe de Adicionar los tems entregados 3. Finaliza carga de items CAMINO ALTERNO

GESTIONAR ENTREGA Este CU es el encargado de Registrar una entrega de productos por algn distribuidor. Distribuidor Distribuidor Deben existir Distribuidores, los productos y los empleados deben estar registrados. Puede o no realizarse un pago de los productos entregados

Respuesta del Sistema

3.1. Una vez los datos estn verificados se puede registrar los datos correctamente

4. No se pudo obtener conexion y/o error al cargar los datos 5. Un nuevo Distribuidor un nuevo producto

uc GestionarPago de cuenta

GestionarPagoCuenta

Pg. 4
User (from Actors)

CU5 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor 1. identifica la distribuidora 2. Elige la cuenta 3. Coloca la cuota que se dara al distribuidor CAMINO ALTERNO

GESTIONAR PAGO DE CUENTAS Este CU es el encargado de Registrar Los pagos que se realizan por la recepcin de productos User(Adm,empleado) User(Adm,empleado) Tiene que haberse realizado una entrega por alguna distribuidora

Respuesta del Sistema 1.1.devuelve entregas adeudadas 3.1 se verifica si el monto es igual a los adeudado se registra la cuota y se da de baja la deuda 3.2 si es menor a lo adeudado entonces se registra la cuota

uc GestionarVenta

GesionarVenta

Cliente (from Actors)

Pg. 5

CU6 Propsito Actor Actor Iniciador Precondicin Pos condicin CAMINO BSICO Acciones del Actor
1. Ingresar tems de

GESTIONAR VENTA Encargado Registrar La venta de algn producto Cliente Cliente Debe haberse Creado el cliente, producto, empleado para poder realizar la venta. Puede o no generarse una factura, tambin puede o no realizarse un pago Respuesta del Sistema 1.1. Adiciona a la venta los productos 3.1. Si el Cliente Existe se habilita el pago a cuotas 3.2. Si no existe el cliente se habilita solo el pago al contado 3.1.Pregunta si se va a emitir factura o no

la compra 2. Ingresar Datos Cliente 3. Finalizar Venta CAMINO ALTERNO

4. No se pudo obtener conexin y/o error al cargar los datos

1. 1.1. 1. Fiable

REQUISITOS NO FUNCIONALES FACTORES DE CALIDAD

Es un software fiable porque al tener la caracterstica del proyecto para que su obtencin y forma de trabajo generen resultados Pg. 6

confiables y Aplicacin tolerante a los fallos, no se pone en riesgo bienes econmicos ni sociales 2. Rendimiento El software ser eficiente, ya que es un software de PC y al no tener caractersticas on-line, su diseo no es complejo y esto lo convierte en un software ptimo y gil 3. fcil de Usar Cuenta con Interfaces Graficas de los ms sencillas de manejar de tipo navegador que permite acceder a los registros. 4. Eficiente Las herramientas de desarrollo utilizadas y el lenguaje de programacin escogido para el desarrollo de este software aseguran un buen 1.2. Restricciones

Los Recursos utilizados TIEMPO y PERSONAL: El tiempo estimado para el desarrollo de este sistema de compra venta aproximada mente 6 meses que para realizar el proyecto con un grupo de trabajo no mayor a 4 personas RECURSOS: Los recursos utilizados para el desarrollo de este sistema son los habituales Hardware: Computadora Personal, Impresora Software: Sistema Operativo Windows XP, IDE netbeans para JAVA, Herramienta Case Enterprise Architec, Motor de BD MySql.

2. Anlisis 2.1. Diagrama de Paquete Pg. 7

pkg Analisis Compra + GestionarDistrinuidora + GestionarProdutco Venta + GesionarVenta + GestionarEmpleado Cuentas + GestionarEntrega + GestionarPagoCuenta

2.2.

Diagramas de Comunicacin

Caso de Uso 1 Gestionar Empleado


sd GestionarEmpleado 1: eventoInsertar(Datos) 2: eventoBuscar() 3: eventoEditar() 4: eventoCancelar() NEmpleado 1.4: getDatos() 1.3: actualizar(tipo) 2.3: actualizar(tipo) 3.3: actualizar(tipo) 4.1: actualizar(tipo) 2.4: getDatos() 3.4: obtenerDatos() DEmpleado 1.1: guardar(datos) 2.1: buscar(id) 3.1: editarDatos(datos) 1.2: guardar(datos) 2.2: buscar(id) 3.2: editar(datos)

CEmpleado User (from Actors)

FEmpleado

Caso de Uso 2 Gestionar Producto


sd GestionarProducto 1: eventoCrear() 2: eventoBuscar() 3: eventoEditar() 4: eventocancelar() CProducto User (from Actors) 1.3: actualizar(tipo) 2.3: actualizar(tipo) 3.3: actualizar(tipo) 4.1: actualizar(tipo) 1.4: getDatos() 2.4: getdatos() 3.4: getDatos() NProducto 1.1: guardar(datos) 2.1: buscar(id) 3.1: Editar(datos) 1.2: guardar(datos) 2.2: buscar(id) 3.2: editar(datos)

DProducto

FProducto

Caso de Uso 3 Gestionar Distribuidor

Pg. 8

sd GestionarDistribuidor 1: eventoInsertar() 2: eventoBus car() 3: eventoEditar() 4: eventoCancelar() 1.1: Ins ertar(Datos ) 2.1: Buscar(id) 3.1: editar(datos ) 1.2: ins ertarDatos () 2.2: Bus car(id) 3.2: editar(datos )

Distribuidor (fromActors)

NDis tribuidor

NDis tribuidor 1.4: getDatos ()

DDis tribuidor

1.3: Actualizar(tipo) 2.3: actualizar(tipo) 3.3: actualizar(tipo) 4.1: actualizar(tipo) 2.4: getDatos () 3.4: getDatos ()

FDis tribuidor

Caso de Uso 4 Gestionar Pago


sd GestionarPago

1: eventoGuardar() 2: eventocargar() 3: eventoAdd() 4: eventoCancelar()

1.1: guardar(datos) 2.1: cargar(iddist)

1.3: guardar(datos) DPago

1.2: EditarSaldo(datos) CPago User (from Actors) 1.5: actualizar(tipo) 2.4: actualizar(tipo) 3.1: actualizar(tipo) 4.1: Cancelar(tipo) 2.5: getDatos() NEntrega DEntrega NPago 1.6: getdatos() 2.2: cargar(iddistr) 1.4: EditarSaldo(datos) 2.3: BuscarEntregas (idistri)

FPago

Caso de Uso 5 Gestionar Entrega


sd GestionarEntrega 1: eventoAddItem() 2: eventoGuardarItem() 3: eventoEliminar() 4: eventoGuardar() 4.1: guardar(datos) 4.2: guardar(datos)

Distribuidor (from Actors)

CEntrega 1.1: actualizar(tipo) 2.1: actualizar(ti po) 3.1: actualizar(tipo) 4.5: actualizar(ripo)

NEntrega 4.3: guardar(datos) 4.6: getDatos()

DEntrega

4.4: guardar(datos)

FEntrega

NDetalleEntrega

DetalleEntrega

Caso de Uso 6 Gestionar Venta

Pg. 9

sd GestionarVenta

1: eventoguardar() 2: eventoBuscarProducto() 3: eventoSeleccionarProducto() 4: eventoSeleccionarEntrega() 5: eventoAddItem() 6: eventoGuardarItem() 7: eventoEliminarItem() CVenta Cliente (from Actors) 1.8: actualizar(tipo) 2.4: Actualizar(tipo) 3.5: actualizar(tipo) 4.1: actualizar(tipo) 5.1: actualizar(tipo) 6.1: actualizar(tipo) 7.1: actualizar(tipo) NEntrega (from Cuentas) 3.6: getDatos() 2.5: getDatos() 1.2: guardar(Datos) 1.1: guardar(Datos) 2.1: BuscarProducto(Nombre) 3.1: BuscarDetalleventa() 1.3: guardar(Datos)

DVenta

1.4: guardar(datos)

NVenta 3.2: buscardetalle(id)

NDetalleVenta

DetalleVenta

1.5: actualizarEntregas(datos) 3.3: buscardetalle(id) 3.4: buscarDetalle(id) 1.6: actualizarvendido(datos) 1.7: actualizarvendido(datos)

NDetalleEntrega (from Cuentas)

DetalleEntrega (from Cuentas)

FVenta

2.2: BuscarProductoVendido(Nombre)

2.3: BuscarProducto()

NProducto (from Compra)

DProducto (from Compra)

3. Diseo 3.1. Diagramas de Clases Dinmicos Pg. 10

Caso de Uso 1 Gestionar Empleado


class GestionarEmpleado javax.swing.JFram e Vista::FEmpleado_1 ~ + + + + + + nempleado: NEmpleado CI: javax.swing.JT extField CodEmpleado: javax.swing.JTextField Direccion: j avax.swing.JTextField Nombre: javax.swi ng.JT extField Telefono: javax.swing.JTextFi eld FEmpleado_1(NEmpleado) initComponents() : void Actualizar(int) : void getDatos() : Vector Limpi ar() : void MostrarMensaje(int) : voi d setControlador(CControl) : void -dempleado + + + + +

java.io.Serializable Datos::Empleado idempleado: String ci : String nombre: String di reccion: Stri ng telefono: String dventas: Set = new HashSet(0) dentregas: Set = new HashSet(0) hi bert: HibernateUtil Empleado() Empleado(String) generarID() : String guardar() : void ObtenerEmpleado() : void

Negocio::NEmpleado ~nempleado + + + + dempleado: Empleado NEmpleado() Guardar(String, String, String, String) : void Buscar(Stri ng) : void getDatos() : Vector ~mempleado

~nempleado

-hibert javax.swing.JFram e Vista::FEmpleado ~ + + + + + + nempleado: NEmpleado CI: javax.swing.JT extField CodEmpleado: javax.swi ng.JTextField Direccion: j avax.swing.JTextField Nombre: javax.swi ng.JTextField Telefono: javax.swing.JTextFi eld FEmpl eado(NEmpl eado) Actualizar(int) : void getDatos() : Vector Limpi ar() : void MostrarMensaje(int) : voi d setControlador(CControl) : void ~ ~ + + + + + + ActionListener Controlador::CEmpleado vempleado: Vi sta mempleado: NEmpleado CEmpleado(Vista, NEmpleado) getMempleado() : NEmpleado setMempl eado(NEmpl eado) : void getVempl eado() : Vista setVempleado(Vista) : void actionPerformed(ActionEvent) : void + + + + Datos::HibernateUtil sessionFactory: SessionFactory {readOnly} session: ThreadLocal = new ThreadLocal() getSessionFactory() : SessionFactory currentSession() : Session closeSession() : voi d

~vempleado interface Vista::Vista + + + + getDatos() : Vector Actualizar(int) : void Limpi ar() : void setControlador(CControl) : void + interface Controlador::CControl actionPerformed(Acti onEvent) : void

Caso de Uso 2 Gestionar Producto


class GestionarProducto java.io.Serializable Datos::Dproducto + + + + + + + + + idproducto: String nombre: String ddetalle: String ddetalleentregas Set = new H hSet(0) : as ddetalleventas Set = new Has : hSet(0) hibert: HibernateUtil Dproducto() Dproducto(String) s etDdetalleentregas (Set) : void getDdetalleventas : Set () s etDdetalleventas (Set) : void generarID() : String guardar() : void Bus carProductoVenta(Lis t<Dproducto>) : Vector Bus carProducto(String) : Vector ObtenerProducto() : void -dproducto

Datos::HibernateUtil + + + + s s es ionFactory: Ses ionFactory {readOnly} s s s es ion: ThreadLocal = new ThreadLocal() getSes ionFactory() : Ses ionFactory s s currentSes ion() : Ses ion s s clos eSes ion() : void s -hibert

javax.swing .JFram e Vista::FProducto + + + + + + nproducto: NProducto Detalle: javax.s wing.JTextField IDProducto: javax.s wing.JTextField Nombre: javax.s wing.JTextField FProducto(N Producto) initComponents : void () Actualizar(int) : void getDatos : Vector () Limpiar() : void Mos trarMens aje(int) : void s ontrolador(CControl) : void etC

-nproducto javax.swing .JFram e Vista::FProducto_1 + + + + + + nproducto: NProducto D etalle: javax.s ing.JTextField w IDProducto: javax.s wing.JTextField N ombre: javax.s ing.JTextField w initComponents : void () Actualizar(int) : void getDatos : Vector () Limpiar() : void Mos trarMens aje(int) : void s etControlador(CProducto) : void s etControlador(CControl) : void interface Vista::Vista + + + + getDatos : Vector () Actualizar(int) : void Limpiar() : void s etControlador(C Control) : void ~vproducto ~ ~ + + + -nproducto + + + + +

N egocio::NProducto dproducto: Dproducto NProducto() Guardar(String, String) : void Bus carProducto(String) : Vector Bus car(String) : void getDatos : Vector () ~mproducto

ActionListener Controlador::CProducto vproducto: Vis ta mproducto: NProducto CProducto(Vis NProducto) ta, CProducto() actionPerformed(ActionEvent) : void

interface Controlador::CControl + actionPerformed(ActionEvent) : void

Pg. 11

Caso de Uso 3 Gestionar Distribuidor


class GestionarDistribuidor javax.swing.JFram e Vista::FDistribuidor ~ + + + + + ndistribuidor: NDistribuidor CodDistribuidor: javax.swing.JTextField Direccion: javax.swing.JTextField Nombre: javax.swing.JTextField Telefono: javax.swing.JTextField FDistribuidor(NDistribuidor) initComponents() : void Actualizar(int) : void getDatos() : Vector Limpiar() : void setControlador(CControl) : void ~ndistribuidor javax.swing.JFram e Vista::FDistribuidor_1 ~ + + + + + ndistribuidor: NDistribuidor CodDistribuidor: javax.swing.JTextField Direccion: javax.swing.JTextField Nombre: javax.swing.JTextField Telefono: javax.swing.JTextField FDistribuidor_1(NDistribuidor) initComponents() : void Actualizar(int) : void getDatos() : Vector Limpiar() : void setControlador(CControl) : void +vdistribuidor interface Vista::Vista + + + + getDatos() : Vector Actualizar(int) : void Limpiar() : void setControlador(CControl) : void ~ ~ + + ~ndistribuidor + + + + Negocio::NDistribuidor ddistribuidor: Ddistribuidora NDistribuidor() Guardar(String, String, String) : void Buscar(String) : void getDatos() : Vector ~mdistribuidor + + + +

Datos::HibernateUtil sessionFactory: SessionFactory {readOnly} session: ThreadLocal = new ThreadLocal() getSessionFactory() : SessionFactory currentSession() : Session closeSession() : void +h java.io.Serializable Datos::Ddistribuidora -ddistribui dor + + + + + + + iddistribuidora: String nombre: String direccion: String telf: String dentregas: Set = new HashSet(0) h: HibernateUtil Ddistribuidora() Ddistribuidora(String) getDentregas() : Set setDentregas(Set) : void generarID() : String guardar() : void ObtenerDistribuidor() : void

ActionListener Controlador::CDistribuidor vdistribuidor: Vista mdistribuidor: NDistribuidor CDistribuidor(Vista, NDistribuidor) actionPerformed(ActionEvent) : void + interface Controlador::CControl actionPerformed(ActionEvent) : void

Pg. 12

Caso de Uso 4 Gestionar Entrega


class G estio arEntreg n a java .io.Serializa ble D s::D ato detalleen treg a + + + + + + + + iddetalleEntrega: String dentrega: D entrega dproducto: D producto cantidad: Integer precioU nidad: F loat total: F loat vendido: Integer dis ponibleventa: String h: H ibernateU til D detalleentrega() D detalleentrega(String, D entrega) generarID : String () guardar() : void ToVector() : Vector bus cardetalle() : Vector Bus cardetalleVenta(Lis detalleentrega>) : Vec t<D tor actualizarvendido(String, int, int, int) : boolean O btenerdetalle(String) : void ~ ~ ~ + + + + + -detallentrega javax.swing ram .JF e Vista::F treg En a dfm D : efaultTableModel nentrega: N Entrega res float = 0 : C odD tribuidor: javax.s ing.JTextF is w ield C odEm pleado: javax.s ing.JTextF w ield C odEntrega: javax.s ing.JTextF w ield D etalleEntrega: javax.s ing.JTable w F echa: javax.s ing.JTextF w ield Total: javax.s ing.JTextF w ield F Entrega(N Entrega) initC ponents : void om () Actualizar(int) : void getD atos : Vector () Lim piar() : void s ontrolador(C ontrol) : void etC C ~ ~ ~ + + + + + javax.swing ram .JF e Vista::F treg En a_1 dfm D : efaultTableM odel nentrega: N Entrega res float = 0 : C odD tribuidor: javax.s ing.JTextF is w ield C odEm pleado: javax.s ing.JTextF w ield C odEntrega: javax.s ing.JTextF w ield D etalleEntrega: javax.s ing.JTable w F echa: javax.s ing.JTextF w ield Total: javax.s ing.JTextF w ield F Entrega_1(N Entrega) initC omponents : void () Actualizar(int) : void getD atos : Vector () Lim piar() : void s ontrolador(C ontrol) : void etC C

-ddetalleentrega

N o ::N etalleen eg cio D treg a + ~ + + ddetalleentrega: D detalleentrega = null N etalleentrega() D guardar(String, String, int, float, float) : void bus cardetalle(String) : Vector<Vector> actualiza rvendido (String, int, int, int) : boolea n +ndetalleentrega java .io.Serializa ble D atos::D treg en a + + + + + + + -h identrega: String empleado: Em pleado ddis tribuidora: D tribuidora dis fecha: D ate m onto: F loat pagado: String s aldo: float ddetalleentregas Set = new H hSet(0) : as dcuotas Set = new H hSet(0) : as h: H ibernateU til D entrega() getSaldo() : float generarID : String () guardar() : void Bus carEntregas (String) : Vector ToVector() : Vector Bus carentrega(Lis entrega>) : Vector t<D EditarSaldo(String, float, float) : boolean -h D s::H ern ato ib ateU til + + + + s s es ionF actory: Ses ionF s actory {readO nly} s s es ion: ThreadLocal = new ThreadLocal() getSes ionF s actory() : Ses ionF s actory currentSes ion() : Ses ion s s clos eSes ion() : void s N o eg cio::N treg En a -dentrega + + + + + ~ + dentrega: D entrega detallentrega: D detalleentrega ndetalleentrega: N etalleentrega D N Entrega() guardar(String, String, float, Vector) : void bus cardetalle(String) : Vector actualiza rvendido( String, String, int, int, int) : boolea n C argar(String) : Vector EditarSaldo(String, float, float) : void Bus car(String) : void ~m entrega ~ ~ + + ActionListener Cn o trolad r::C treg o En a ventrega: Vis ta m entrega: N Entrega C Entrega(Vis N ta, Entrega) actionPerform ed(ActionEvent) : void ~nentrega ~nentrega + + + +

interface Vista::Vista getD atos : Vector () Actualizar(int) : void Limpiar() : void s ontrolador(C ontrol) : void etC C ~ventrega

interface C n lado C tro o tro r::C on l + actionPerform ed(ActionEvent) : void

Pg. 13

Caso de Uso 5 Gestionar Pago


c las s P ago java x.sw i n g.JFra me V ista ::FP a gos ~ n pa go : NP ag o ~ d fm : Defa ul tT a ble M od el - Cu o ta: j a vax.swi n g.JT extFie ld - De ta l le P ag o: j a vax.swing .JT a bl e - IDCuo ta : j ava x.swi ng.JT e xtFi el d - IDDi stri b ui do r: java x.swi n g.JT e xtFi e ld - IDE ntreg a: ja va x.swi ng .JT e xtFi e l d - M on to : java x.swin g.JT e xtFi eld - S a l d o: j a vax.swi n g.JT extFie ld + + + + + FPa g os(NP a go ) A ctu a l izar(in t) : vo id g etDato s() : Ve ctor L im pi ar() : vo i d se tCo n trol a do r(CCon tro l) : vo id -d en tre ga + + + + + + + ja va.io.S eria li zab le Datos::De ntre ga i de n treg a: Strin g e m p l e a do : E m p l e ad o d d istri bu i do ra : Ddi stri b ui d ora fech a: Da te m o n to : Fl o a t p a ga d o : S trin g sa ld o: fl oa t d d eta l le en tre ga s: S et = n e w Ha shS e t(0) d cuo ta s: S et = n ew Ha shS e t(0 ) h : Hi b erna teUti l Den tre ga () g e tS a ldo () : fl oa t g e ne rarID() : S trin g g u ard ar() : voi d B usca rE n tre ga s(S tri ng ) : V ecto r T oV e cto r() : V e ctor B usca ren tre ga (L ist<Den tre ga >) : V e cto r E di tarSa l do (S tri ng , floa t, fl o at) : b oo l e an

Ne gocio::NE ntrega + + + + + ~ + d en tre ga : Den tre ga d etall en tre ga : Dd e tal lee ntreg a n de ta l le en tre ga : NDetall ee ntreg a NE ntreg a() g ua rd ar(Stri n g , S tri n g, fl o at, V e ctor) : vo i d b usca rde ta l le (S tri ng ) : V e ctor actu al i zarve nd i d o(Stri ng , Stri n g , i nt, in t, i nt) : bo o l e an Carg a r(S tri ng ) : Ve ctor E di tarS ald o(Stri ng , fl o a t, fl oa t) : vo i d B usca r(S tri ng ) : vo id -ne ntreg a

ja va x.sw i n g.JFrame V is ta::FP agos _1 ~ np a g o: NP a go ~ dfm : De fau ltT ab l e M o d e l - Cuo ta : j ava x.swi n g.JT e xtFi el d - Detall eP a g o : ja va x.swi n g.JT a b l e - IDCu o ta: j a vax.swi ng .JT extFie ld - IDDistri b ui d o r: j ava x.swin g.JT extField - IDE n tre ga : j ava x.swi n g .JT extFie l d - M o n to: j a vax.swi ng .JT extFie l d - S al do : j ava x.swi n g.JT e xtFi el d + + + + + FP a go s_1 (NP ag o) A ctu a li za r(i nt) : vo i d ge tDa tos() : V ecto r Li m p i a r() : vo i d setCon tro la d or(CCo n trol ) : voi d ~np a g o Negoc io::NP ago ~n pa g o d pa go : Dcuo ta n en tre ga : NE ntreg a

-h Datos ::Hibe rna teUtil + + + + se ssi o nFacto ry: Se ssi o nFa ctory {rea dO n l y} se ssi o n: T h rea d L oca l = n ew T hre a dL ocal () g e tS e ssi on Fa ctory() : S essi on Fa ctory cu rre ntS essi on () : S e ssi on cl ose S essio n() : voi d -h

+ NP ag o() + g ua rd ar(Stri n g , S tri n g, Stri n g , S tri n g) : voi d + Ca rg a r(S tri ng ) : Ve ctor ~m p ag o

-d pa go + + + + +

ja va.io .S e riali zable Datos::Dc uota i dcu ota : S tri ng d en tre g a: De ntreg a m o nto : Fl oa t cu o ta: Fl o a t h : Hi b ern a teUti l Dcu o ta() Dcu o ta(S tri n g ) Dcu o ta(S tri n g , De ntreg a, Fl oa t, Flo at) g en e rarID() : S trin g g ua rd ar() : voi d

+ + + +

~vp a g o ge tDa tos() : V ecto r A ctua l i za r(i n t) : vo i d Li m p ia r() : voi d setCon tro la d or(CCo ntrol ) : vo i d

i n te rfa ce V ista ::V is ta

A cti on Liste ne r Controlador::CP a go ~ ~ + + vp ag o: V i sta m p a g o: NP ag o CP a go (V i sta , NP ag o) actio nP erfo rm e d (A cti on Even t) : vo id

interface Controlador::CControl + a cti o nP e rfo rm ed (A cti on E ven t) : voi d

Pg. 14

Caso de Uso 6 Gestionar Venta


class GestionarVenta javax.swing.JFram e Vista::FVenta ~ ~ ~ ~ ~ + + + + + nventa: NVenta dfm: DefaultT ableM odel detalleelegido: Vector = null v: Vector<Vector> res: float = 0 swjb1: boolean = fal se swjb2: boolean = fal se BucarProNombre: javax.swing.JTextField ComboLotesDetalleentre: javax.swing.JCom boBox ComboProductos: javax.swing.JComboBox DetalleVenta: javax.swing.JTable IDEmpleado: javax.swing.JTextField IDVenta: javax.swing.JTextField Ni t: javax.swing.JTextField NombreCliente: javax.swing.JTextField TotalVenta: javax.swing.JTextFiel d FVenta(NVenta) addItem() : void eliminarItem() : void guardarItem () : void BuscarProducto() : void SeleccionarProducto() : void getID(String) : String Seleccionardetalle() : void Actualizar(i nt) : void getDatos() : Vector Limpiar() : void setControlador(CControl) : void + + + + + + + Datos::Dv enta idventa: String empleado: Empleado nombre: String nit: String monto: Float fecha: Date ddetalleventas: Set = new HashSet(0) h: HibernateUtil Dventa() Dventa(String) Dventa(String, Empleado, String, String, Float, Date, Set) getDdetalleventas() : Set setDdetalleventas(Set) : void generarID() : String guardar() : voi d -dventa

java.io.Seriali zable java.io.Serializable Datos::Ddetallev enta + + + + + + + i ddetalleVenta: String dventa: Dventa dproducto: Dproducto cantidad: Integer h: Hi bernateUtil Ddetalleventa() Ddetalleventa(String) setDproducto(Dproducto) : void getCantidad() : Integer setCantidad(Integer) : void generarID() : String guardar() : void -dv

-dventa

Negocio::NDetallev enta + ~ dv: Ddetalleventa = null NDetalleventa() guardar(String, String, int) : void

-ndetalleventa javax.swi ng.JFram e

Vista::FVenta_1 ~ ~ ~ ~ ~ + + + + + nventa: NVenta dfm: DefaultTableModel detalleelegido: Vector = null v: Vector<Vector> res: float = 0 swjb1: boolean = false swjb2: boolean = false BucarProNombre: javax.swing.JT extFi eld ComboLotesDetalleentre: javax.swing.JComboBox ComboProductos: javax.swing.JComboBox DetalleVenta: javax.swing.JT able IDEmpleado: j avax.swing.JTextField IDVenta: javax.swing.JT extField Nit: javax.swing.JT extFi eld NombreCliente: javax.swing.JTextFiel d T otalVenta: javax.swing.JT extField FVenta_1(NVenta) addItem() : void eliminarItem() : void guardarItem() : void BuscarProducto() : void SeleccionarProducto() : void getID(String) : String Seleccionardetalle() : void Actualizar(int) : void getDatos() : Vector Limpiar() : void setControlador(CControl) : void +

~nventa + ~nventa + + + + + + +

Negocio::NVenta dventa: Dventa ndetalleventa: NDetalleventa productos: Vector nproducto: NProducto nentrega: NEntrega getDventa() : Dventa setDventa(Dventa) : voi d NVenta() guardar(String, Stri ng, String, float, Vector<Vector>) : void getID(String) : String getProductos() : Vector setProductos(Vector) : void BuscarProducto(String) : void Buscardetalleventa(String) : Vector<Vector> ~mventa ActionListener

interface Vista::Vista + + + + getDatos() : Vector Actualizar(int) : void Limpiar() : void setControlador(CControl) : void

Controlador::CVenta ~vventa ~ ~ + + vventa: Vista mventa: NVenta CVenta(Vista, NVenta) actionPerformed(ActionEvent) : void

interface Controlador::CControl actionPerformed(ActionEvent) : void

Pg. 15

3.2.

Diagrama de Clases Esttico

class Domain Obj e...

DVenta + + + + + idVenta: String IdEmpleado: String Nombre: String Nit: String Monto: float Fecha: DateTime Guardar() : void Eliminar() : void Busar() : void setIdVenta(String) : void ...() : .... 1..* 1 + + + + + +

DEmpleado idEmpelado: String CI: String Nombre: String Direccion: String Telefono: String Guardar() : void Editar() : void Eliminar() : void Buscar(id) : DEmpleado Buscar(Nombre) : DEmpleado generarId() : String

DEntrega + + + idEntrega: String idDistribuidor: int Fecha: DateTime montoTotal: float idEmpleadoRecibe: int 1..* estado: int Guardar() : void Editar() : void generarID() : void 1..* DDetalleEntrega + + + + identrega: String idDetalle: String cant: int precioUnitario: float Total: float marca: int Guardar() : void Editar() : void Eliminar() : void generarID() : void 1 1 + + 1 + + + +

DDistribuidora idDistribuidora: String Nombre: String Direccion: String Telefono: String Guardar() : void Editar() : void Buscar() : void GenerarID() : String

1..* DDetalleVenta IdDetalle: String idVenta: String idProducto: String cantidad: int Guardar() : void Editar() : void Eliminar() : void 1

DCuota idDistribuidor: String IDEntrega: String Monto: int Cuota: int Saldo: int GenerarId() : void Guardar() : void

+ + +

1 DProducto 1 + + + + + + CodProducto: String Nombre: String Detalle: String Marca: int presentacion: String Buscar(String) : DProducto[] Buscar(String) : DProducto[] Editar() : void Eliminar() : void Guardar() : void generarCodigo() : String

3.3.
pkg Diseo

Diagrama de Paquetes
Datos + Dcuota

Vista + FDistribuidor + FDistribuidor_1 + FEmpleado + FEmpleado_1 + FEntrega + FEntrega_1 + FPagos + FPagos_1 + FProducto + FProducto_1 + FVenta + FVenta_1 + Vista (from Domain Model) (from Domain Model) Modelo + Datos + Negocio

+ Ddetalleentrega + Ddetalleventa + Ddistribuidora + Dentrega + Dproducto + Dventa + Empleado + HibernateUtil (from Modelo)

Negocio + NDetalleentrega + NDetalleventa + NDistribuidor + NEmpleado + NEntrega Controlador + CDistribuidor + CEmpleado + CEntrega + CPago + CProducto + CVenta + CControl (from Domain Model) + NPago + NProducto + NVenta (from Modelo)

Pg. 16

3.4.

Mapeo

Pg. 17

You might also like