SlideShare una empresa de Scribd logo
1 de 9
Un restaurant de la ciudad, ofrece desayunos a 803 BsF,
almuerzos a 1050 BsF y cenas a 956 BsF. Estos montos ya
incluyen IVA.
Como datos de entrada por cada venta se tiene: Tipo de comida
(desayuno, almuerzo o cena), número de comidas, número de niños
y cantidad de personas de la tercera edad.
Se tiene como política del restaurant:
A los niños se les hace un descuento del 5% en el almuerzo y
10% en la cena y a las personas de la tercera edad un descuento
del 9% en el desayuno.
a.- Por cada venta se requiere Monto total vendido.
b.- Por el restaurant: Monto total vendido por cada tipo de comida
y total general.
Análisis del problema
Lista Clasificación
Venta ---------------- Clase
TipoComida------------ Atributo/Venta
NroComida------------- Atributo/Venta
NroNiños ----------- Atributo/Venta
Nro3eraEdad---------- Atributo/Venta
Restaurant ------------  Clase
CalcMontoVendido-  Método /Restaurant
CalcTotalGeneral  Método /Restaurant
f.u. 1) Inicializar( Acumdes,Acumalm,Acumcen)
Se inicializa en cero los acumuladores
por cada tipo de comida que van
almacenar monto total vendido por
desayuno , almuerzo y cena
Es de frecuencia única ya que se
inicializa una vez
f.m. 2)Leer(Tipocomida,NroComida,NroNiños,Nro3raEdad)
f.m. 3) si( Tipocomida=“Desayuno”)
inicio
MontVendido ← NroComidas*803– Nro3eraEdad*803*9/100
Acumdes ← Acumdes + MontVendido
fin
sino
si(Tipocomida=“Almuerzo”)
inicio
MontVendido ← NroComidas*1050– NroNiños*1050*5/100
Acumalm ← Acumalm + MontVendido
fin
sino
si(Tipocomida=“Cena”)
inicio
MontVendido ← NroComidas*956– NroNiños*956*10/100
Acumcen ← Acumcen + MontVendido
fin
sino
Montvendido ← 0
“MontVendido”
almacena el
monto vendido
por cada venta
“Acumdes” almacena
monto total vendido por
desayunos
“Acumalm” almacena
monto total vendido por
almuerzos
“Acumcen” almacena
monto total vendido por
cena
f.u.4) Totalgen ← Acumdes+Acumalm+Acumcen
“Totalgen” almacena
el monto total vendido
por el restaurant
Diagrama
leer respuesta
1
2
3 leer respuesta
4
2
3
repetir mientras (respuesta =“Si”)
Venta
Venta
alfanumérico TipoComida
entero NroComida, NroNiños, Nro3raEdad
AsignarTipoComida(alfanumérico↓TC)
AsignarNroComida(entero↓NC)
AsignarNroNiños(entero↓NN)
AsignarNro3raEdad(entero↓N3E)
alfanumérico SacarTipoComida()
entero SacarNroComida()
entero SacarNroNiños()
entero SacarNro3raEdad()
Restaurant
Restaurant
real Acumdes, Acumalm, Acumcen
Inicializar()
CalcMontoVendido (Venta↓V)
real CalcTotalGeneral()

Más contenido relacionado

Último

RESOLUCION_VICE_MINISTERIAL-00048-2024-M-EVALUACIÓN EVALAUCION FORMATIVA MINE...
RESOLUCION_VICE_MINISTERIAL-00048-2024-M-EVALUACIÓN EVALAUCION FORMATIVA MINE...RESOLUCION_VICE_MINISTERIAL-00048-2024-M-EVALUACIÓN EVALAUCION FORMATIVA MINE...
RESOLUCION_VICE_MINISTERIAL-00048-2024-M-EVALUACIÓN EVALAUCION FORMATIVA MINE...
helmer del pozo cruz
 
FICHA DE LA VIRGEN DE FÁTIMA.pdf educación religiosa primaria de menores
FICHA DE LA VIRGEN DE FÁTIMA.pdf educación religiosa primaria de menoresFICHA DE LA VIRGEN DE FÁTIMA.pdf educación religiosa primaria de menores
FICHA DE LA VIRGEN DE FÁTIMA.pdf educación religiosa primaria de menores
Santosprez2
 
PLAN LECTOR QUINTO 2023 educación primaria de menores Quinto grado
PLAN LECTOR QUINTO 2023  educación primaria de menores Quinto gradoPLAN LECTOR QUINTO 2023  educación primaria de menores Quinto grado
PLAN LECTOR QUINTO 2023 educación primaria de menores Quinto grado
Santosprez2
 
Pasos para enviar una tarea en SIANET - sólo estudiantes.pdf
Pasos para enviar una tarea en SIANET - sólo estudiantes.pdfPasos para enviar una tarea en SIANET - sólo estudiantes.pdf
Pasos para enviar una tarea en SIANET - sólo estudiantes.pdf
NELLYKATTY
 
Ediciones Previas Proyecto de Innovacion Pedagogica ORIGAMI 3D Ccesa007.pdf
Ediciones Previas Proyecto de Innovacion Pedagogica ORIGAMI 3D  Ccesa007.pdfEdiciones Previas Proyecto de Innovacion Pedagogica ORIGAMI 3D  Ccesa007.pdf
Ediciones Previas Proyecto de Innovacion Pedagogica ORIGAMI 3D Ccesa007.pdf
Demetrio Ccesa Rayme
 
ACTIVIDAD 19 Construyo mi identidad personal y familiar para fortalecer los v...
ACTIVIDAD 19 Construyo mi identidad personal y familiar para fortalecer los v...ACTIVIDAD 19 Construyo mi identidad personal y familiar para fortalecer los v...
ACTIVIDAD 19 Construyo mi identidad personal y familiar para fortalecer los v...
MarcoAntonioAmayaSag
 

Último (20)

La historia de la vida estudiantil a 102 años de la fundación de las Normales...
La historia de la vida estudiantil a 102 años de la fundación de las Normales...La historia de la vida estudiantil a 102 años de la fundación de las Normales...
La historia de la vida estudiantil a 102 años de la fundación de las Normales...
 
MINEDU BASES JUEGOS ESCOLARES DEPORTIVOS PARADEPORTIVOS 2024.docx
MINEDU BASES JUEGOS ESCOLARES DEPORTIVOS PARADEPORTIVOS 2024.docxMINEDU BASES JUEGOS ESCOLARES DEPORTIVOS PARADEPORTIVOS 2024.docx
MINEDU BASES JUEGOS ESCOLARES DEPORTIVOS PARADEPORTIVOS 2024.docx
 
RESOLUCION_VICE_MINISTERIAL-00048-2024-M-EVALUACIÓN EVALAUCION FORMATIVA MINE...
RESOLUCION_VICE_MINISTERIAL-00048-2024-M-EVALUACIÓN EVALAUCION FORMATIVA MINE...RESOLUCION_VICE_MINISTERIAL-00048-2024-M-EVALUACIÓN EVALAUCION FORMATIVA MINE...
RESOLUCION_VICE_MINISTERIAL-00048-2024-M-EVALUACIÓN EVALAUCION FORMATIVA MINE...
 
Estudios Sociales libro 8vo grado Básico
Estudios Sociales libro 8vo grado BásicoEstudios Sociales libro 8vo grado Básico
Estudios Sociales libro 8vo grado Básico
 
¿Que es Fuerza? online 2024 Repaso CRECE.pptx
¿Que es Fuerza? online 2024 Repaso CRECE.pptx¿Que es Fuerza? online 2024 Repaso CRECE.pptx
¿Que es Fuerza? online 2024 Repaso CRECE.pptx
 
FICHA DE LA VIRGEN DE FÁTIMA.pdf educación religiosa primaria de menores
FICHA DE LA VIRGEN DE FÁTIMA.pdf educación religiosa primaria de menoresFICHA DE LA VIRGEN DE FÁTIMA.pdf educación religiosa primaria de menores
FICHA DE LA VIRGEN DE FÁTIMA.pdf educación religiosa primaria de menores
 
a propósito del estado su relevancia y definiciones
a propósito del estado su relevancia y definicionesa propósito del estado su relevancia y definiciones
a propósito del estado su relevancia y definiciones
 
tema 6 2eso 2024. Ciencias Sociales. El final de la Edad Media en la Penínsul...
tema 6 2eso 2024. Ciencias Sociales. El final de la Edad Media en la Penínsul...tema 6 2eso 2024. Ciencias Sociales. El final de la Edad Media en la Penínsul...
tema 6 2eso 2024. Ciencias Sociales. El final de la Edad Media en la Penínsul...
 
Comunidades Virtuales de Aprendizaje Caracteristicas.pptx
Comunidades Virtuales de Aprendizaje Caracteristicas.pptxComunidades Virtuales de Aprendizaje Caracteristicas.pptx
Comunidades Virtuales de Aprendizaje Caracteristicas.pptx
 
Motivados por la esperanza. Esperanza en Jesús
Motivados por la esperanza. Esperanza en JesúsMotivados por la esperanza. Esperanza en Jesús
Motivados por la esperanza. Esperanza en Jesús
 
En un aposento alto himno _letra y acordes.pdf
En un aposento alto himno _letra y acordes.pdfEn un aposento alto himno _letra y acordes.pdf
En un aposento alto himno _letra y acordes.pdf
 
PLAN LECTOR QUINTO 2023 educación primaria de menores Quinto grado
PLAN LECTOR QUINTO 2023  educación primaria de menores Quinto gradoPLAN LECTOR QUINTO 2023  educación primaria de menores Quinto grado
PLAN LECTOR QUINTO 2023 educación primaria de menores Quinto grado
 
Pasos para enviar una tarea en SIANET - sólo estudiantes.pdf
Pasos para enviar una tarea en SIANET - sólo estudiantes.pdfPasos para enviar una tarea en SIANET - sólo estudiantes.pdf
Pasos para enviar una tarea en SIANET - sólo estudiantes.pdf
 
Ediciones Previas Proyecto de Innovacion Pedagogica ORIGAMI 3D Ccesa007.pdf
Ediciones Previas Proyecto de Innovacion Pedagogica ORIGAMI 3D  Ccesa007.pdfEdiciones Previas Proyecto de Innovacion Pedagogica ORIGAMI 3D  Ccesa007.pdf
Ediciones Previas Proyecto de Innovacion Pedagogica ORIGAMI 3D Ccesa007.pdf
 
ACTIVIDAD 19 Construyo mi identidad personal y familiar para fortalecer los v...
ACTIVIDAD 19 Construyo mi identidad personal y familiar para fortalecer los v...ACTIVIDAD 19 Construyo mi identidad personal y familiar para fortalecer los v...
ACTIVIDAD 19 Construyo mi identidad personal y familiar para fortalecer los v...
 
REGLAMENTO FINAL DE EVALUACIÓN 2024 pdf.pdf
REGLAMENTO  FINAL DE EVALUACIÓN 2024 pdf.pdfREGLAMENTO  FINAL DE EVALUACIÓN 2024 pdf.pdf
REGLAMENTO FINAL DE EVALUACIÓN 2024 pdf.pdf
 
GOBIERNO DE MANUEL ODRIA EL OCHENIO.pptx
GOBIERNO DE MANUEL ODRIA   EL OCHENIO.pptxGOBIERNO DE MANUEL ODRIA   EL OCHENIO.pptx
GOBIERNO DE MANUEL ODRIA EL OCHENIO.pptx
 
Época colonial: vestimenta, costumbres y juegos de la época
Época colonial: vestimenta, costumbres y juegos de la épocaÉpoca colonial: vestimenta, costumbres y juegos de la época
Época colonial: vestimenta, costumbres y juegos de la época
 
Realitat o fake news? – Què causa el canvi climàtic? - La desertització
Realitat o fake news? – Què causa el canvi climàtic? - La desertitzacióRealitat o fake news? – Què causa el canvi climàtic? - La desertització
Realitat o fake news? – Què causa el canvi climàtic? - La desertització
 
ciclos biogeoquimicas y flujo de materia ecosistemas
ciclos biogeoquimicas y flujo de materia ecosistemasciclos biogeoquimicas y flujo de materia ecosistemas
ciclos biogeoquimicas y flujo de materia ecosistemas
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Proyecto 2

  • 1.
  • 2. Un restaurant de la ciudad, ofrece desayunos a 803 BsF, almuerzos a 1050 BsF y cenas a 956 BsF. Estos montos ya incluyen IVA. Como datos de entrada por cada venta se tiene: Tipo de comida (desayuno, almuerzo o cena), número de comidas, número de niños y cantidad de personas de la tercera edad. Se tiene como política del restaurant: A los niños se les hace un descuento del 5% en el almuerzo y 10% en la cena y a las personas de la tercera edad un descuento del 9% en el desayuno. a.- Por cada venta se requiere Monto total vendido. b.- Por el restaurant: Monto total vendido por cada tipo de comida y total general.
  • 3. Análisis del problema Lista Clasificación Venta ---------------- Clase TipoComida------------ Atributo/Venta NroComida------------- Atributo/Venta NroNiños ----------- Atributo/Venta Nro3eraEdad---------- Atributo/Venta Restaurant ------------  Clase CalcMontoVendido-  Método /Restaurant CalcTotalGeneral  Método /Restaurant
  • 4. f.u. 1) Inicializar( Acumdes,Acumalm,Acumcen) Se inicializa en cero los acumuladores por cada tipo de comida que van almacenar monto total vendido por desayuno , almuerzo y cena Es de frecuencia única ya que se inicializa una vez
  • 5. f.m. 2)Leer(Tipocomida,NroComida,NroNiños,Nro3raEdad) f.m. 3) si( Tipocomida=“Desayuno”) inicio MontVendido ← NroComidas*803– Nro3eraEdad*803*9/100 Acumdes ← Acumdes + MontVendido fin sino si(Tipocomida=“Almuerzo”) inicio MontVendido ← NroComidas*1050– NroNiños*1050*5/100 Acumalm ← Acumalm + MontVendido fin sino si(Tipocomida=“Cena”) inicio MontVendido ← NroComidas*956– NroNiños*956*10/100 Acumcen ← Acumcen + MontVendido fin sino Montvendido ← 0 “MontVendido” almacena el monto vendido por cada venta “Acumdes” almacena monto total vendido por desayunos “Acumalm” almacena monto total vendido por almuerzos “Acumcen” almacena monto total vendido por cena
  • 6. f.u.4) Totalgen ← Acumdes+Acumalm+Acumcen “Totalgen” almacena el monto total vendido por el restaurant
  • 7. Diagrama leer respuesta 1 2 3 leer respuesta 4 2 3 repetir mientras (respuesta =“Si”)
  • 8. Venta Venta alfanumérico TipoComida entero NroComida, NroNiños, Nro3raEdad AsignarTipoComida(alfanumérico↓TC) AsignarNroComida(entero↓NC) AsignarNroNiños(entero↓NN) AsignarNro3raEdad(entero↓N3E) alfanumérico SacarTipoComida() entero SacarNroComida() entero SacarNroNiños() entero SacarNro3raEdad()
  • 9. Restaurant Restaurant real Acumdes, Acumalm, Acumcen Inicializar() CalcMontoVendido (Venta↓V) real CalcTotalGeneral()