Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Ejercicios-Modelado/ej3b.puml
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
91 lines (77 sloc)
2.16 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
title Ejecicio 3 - Restaurantes y Gourments (Versión 2) \n Modelo Conceptual | |
!include estilos/draft.iuml | |
'Entidades | |
!include clases/ej3b.iuml | |
' Asociaciones | |
ItemCarta <|-d- Menú : {Completa,Disjunta} | |
ItemCarta <|-d- Elemento : {Completa,Disjunta} | |
Menú "0..1"-d-"*" Elemento : formadoPor > | |
TipoElemento *-u- "*" Elemento : < perteneceA | |
ItemCarta *-u- "*" Like : esCalificado > | |
Gourmet *-d- "*" Like : califica > | |
'Reglas de negocio | |
note as rn2 | |
RN-02: Precio de venta vs precio de coste | |
--- | |
En cualquier Item: precioVenta >= precioCoste | |
En Menús: El precioVenta tiene que ser al | |
menos un 10% más barato que la suma de | |
precios venta de sus elementos | |
end note | |
rn2 .. ItemCarta | |
note as rn3 | |
RN03: Derivación del like | |
--- | |
Se calcula mediante la | |
media aritmética de likes | |
de los Gourmets que han | |
calificado un ItemCarta | |
que lo permite | |
end note | |
rn3 .u. ItemCarta | |
note as rn4 | |
RN04: Existencia de Like | |
--- | |
Solo si ItemCarta.admiteLikes | |
end note | |
rn4.. Like | |
rn4..ItemCarta | |
@enduml | |
@startuml | |
title Ejecicio 3 - Restaurantes y Gourmets (Versión 2) \n Diagrama de Objetos | |
!include estilos/final.iuml | |
' Objetos | |
!include objetos/ej3b.iuml | |
' Enlaces entre objetos | |
mn <|-d- mn_m | |
te_p1 *-u- mn_p1_e : < __perteneceA__ | |
te_p2 *-u- mn_p2_e : < __perteneceA__ | |
mn_p1 <|-u- mn_p1_e | |
mn_p2 <|-u- mn_p2_e | |
mn_m *-d- mn_p1_e: __formadoPor__ > | |
mn_m *-d- mn_p2_e : __formadoPor__ > | |
g1 *-- l_mn_m_g1 : __califica__ > | |
mn_m *-u- l_mn_m_g1 : __esCalificado__ > | |
g2 *-- l_mn_m_g2 : __califica__ > | |
mn_m *-u- l_mn_m_g2 : __esCalificado__ > | |
' Conformidad (cumplimiento) de Restricciones de Integridad | |
note as rns | |
Conformidad de Reglas de Negocio | |
--- | |
RN01: Derivación precio de coste del Menú | |
--- | |
mn.precioCoste(2.8)=mn_p1.precioCoste(2)+mn_p2.precioCoste(0.8) | |
--- | |
RN-02: Precio de venta vs Precio de Coste | |
--- | |
mn.precioVenta(5)>=mn.precioCoste(2.8) | |
mn_p1.precioVenta(4.5)>=mn_p1.precioCoste(2) | |
mn_p2.precioVenta(2.5)>=mn_p1.precioCoste(0.8) | |
El descuento en este menú es (7-5)/7=29% >= 10% | |
--- | |
RN-03: Derivación del like del menú | |
--- | |
mn.like(2)=(l_mn_g1.like(1)+l_mn_g2.like(3) / 2 | |
end note | |
@enduml | |