SlideShare una empresa de Scribd logo
Tema:Aplicaciones estructuradas condicionales
simple y compuesta con operaciones de cálculo
Docente: Alex Villegas Jiménez
SESIÓN N°8: APLICACIONES CON ESTRUCTURA CONDICIONAL
SIMPLE
OPERACIONE DE CÁLCULO CON
ESTRUCTURAS DE CONTROL SECUENCIAL
ALGORITMO PARA LA CLASE
ESTUDIANTE
public class Estudiante {
String idmatricula;
String apepat;
String apemat;
String nombres;
int añonac;
int añoact;
int edad;
public Estudiante(String idmatricula, String apepat,
String apemat, String nombres, int añonac, int añoact,
int edad) {
this.idmatricula = idmatricula;
this.apepat = apepat;
this.apemat = apemat;
this.nombres = nombres;
this.añonac = añonac;
this.añoact = añoact;
this.edad = edad;
}
}
public String getIdmatricula() {
return idmatricula;
}
public void setIdmatricula(String idmatricula) {
this.idmatricula = idmatricula;
}
public String getApepat() {
return apepat;
}
public void setApepat(String apepat) {
this.apepat = apepat;
}
public String getApemat() {
return apemat;
}
public void setApemat(String apemat) {
this.apemat = apemat;
}
public String getNombres() {
return nombres;
}
public void setNombres(String nombres) {
this.nombres = nombres;
}
ALGORITMO PARA LA
CLASE ESTUDIANTE
public int getAñonac() {
return añonac;
}
public void setAñonac(int añonac) {
this.añonac = añonac;
}
public int getAñoact() {
return añoact;
}
public void setAñoact(int añoact) {
this.añoact = añoact;
}
public int getEdad() {
return edad;
}
public void setEdad(int edad) {
this.edad = edad;
}
int edad;
Estudiante (){
}
ALGORITMO PARA EL OBJETO ESTUDIANTE - SWING
package pooestudiante;
import javax.swing.*;
public class objetoestudiante {
public static void main(String[] arg){
String emat;
String eapepat;
String eapemat;
String enombre;
int eañonac;
int eañoact;
int edad;
emat=JOptionPane.showInputDialog("Ingrese
codigo de matricula:");
eapepat=JOptionPane.showInputDialog("Ingrese
apellido paterno:");
eapemat=JOptionPane.showInputDialog("Ingrese
apellido materno:");
enombre=JOptionPane.showInputDialog("Ingrese
nombre(s):");
eañonac=Integer.parseInt(JOptionPane.showInputDialog("
Ingrese año nacimiento:"));
eañoact=Integer.parseInt(JOptionPane.showInputDialog("I
ngrese año actual:"));
edad=eañoact-eañonac;
ALGORITMO PARA EL OBJETO ESTUDIANTE -
SWING
Estudiante student = new Estudiante();
student.setIdmatricula(emat);
student.setApepat(eapepat);
student.setApemat(eapemat);
student.setNombres(enombre);
student.getAñonac();
student.getAñoact();
student.setEdad(edad);
JOptionPane.showMessageDialog(null,"Datos del
estudiante:"+" "+student.getIdmatricula()+"
"+student.getApepat()+" "+student.getApemat()+"
"+student.getNombres());
JOptionPane.showMessageDialog(null,"La edad del
estudiabte es:"+student.getEdad());
if (edad>=18){
JOptionPane.showMessageDialog(null,"MAYOR DE
EDAD");
}else {JOptionPane.showMessageDialog(null,"MENOR DE
EDAD"); }
}
DEMOSTRACIÓN PRÁCTICA DEL PROMEDIO DE NOTAS DE LOS ESTUDIANTES
PARA SABER SU CONDICIÓN
TAREA DE SEMANA 8: PARTICPACIÓN PRÁCTICA -
TEÓRICA EN AULA Y LABORATORIO CÓMPUTO

Más contenido relacionado

Último

MODULO BASICO DE WORD - I CICLO.DOC.DOC.
MODULO BASICO DE WORD - I CICLO.DOC.DOC.MODULO BASICO DE WORD - I CICLO.DOC.DOC.
MODULO BASICO DE WORD - I CICLO.DOC.DOC.CarmenFlores88207
 
Escaneo y eliminación de malware en el equipo
Escaneo y eliminación de malware en el equipoEscaneo y eliminación de malware en el equipo
Escaneo y eliminación de malware en el equiponicromante2000
 
infografia del sena para analisis y desarrollo de software
infografia del sena para analisis y desarrollo de softwareinfografia del sena para analisis y desarrollo de software
infografia del sena para analisis y desarrollo de softwareoscartorres960914
 
Los desafíos de calidad de software que nos trae la IA y los LLMs
Los desafíos de calidad de software que nos trae la IA y los LLMsLos desafíos de calidad de software que nos trae la IA y los LLMs
Los desafíos de calidad de software que nos trae la IA y los LLMsFederico Toledo
 
experiencia de aprendizaje sobre lectura y escritura como herramientas de ap...
experiencia de aprendizaje sobre lectura y escritura como  herramientas de ap...experiencia de aprendizaje sobre lectura y escritura como  herramientas de ap...
experiencia de aprendizaje sobre lectura y escritura como herramientas de ap...cuentauniversidad34
 
Maquina de Dibujo y Escritura Automática.pdf
Maquina de Dibujo y Escritura Automática.pdfMaquina de Dibujo y Escritura Automática.pdf
Maquina de Dibujo y Escritura Automática.pdfjuanjosebarreiro704
 
FICHA DE TRABAJO DE CREACION DE TABLAS EN WORD
FICHA  DE TRABAJO DE CREACION DE TABLAS EN WORDFICHA  DE TRABAJO DE CREACION DE TABLAS EN WORD
FICHA DE TRABAJO DE CREACION DE TABLAS EN WORDRobertSotilLujn
 
trabajo integrador final sofi y vane.docx
trabajo integrador final sofi y vane.docxtrabajo integrador final sofi y vane.docx
trabajo integrador final sofi y vane.docxlasocharfuelan123
 
Documento colaborativo. Solución del caso GA1-240201526-AA6-EV01.pdf
Documento colaborativo. Solución del caso GA1-240201526-AA6-EV01.pdfDocumento colaborativo. Solución del caso GA1-240201526-AA6-EV01.pdf
Documento colaborativo. Solución del caso GA1-240201526-AA6-EV01.pdfHAROLD IVANOVICH
 
Virus informático (tipos y opciones para prevenir)
Virus informático (tipos y opciones para prevenir)Virus informático (tipos y opciones para prevenir)
Virus informático (tipos y opciones para prevenir)edisonquispecalderon
 

Último (10)

MODULO BASICO DE WORD - I CICLO.DOC.DOC.
MODULO BASICO DE WORD - I CICLO.DOC.DOC.MODULO BASICO DE WORD - I CICLO.DOC.DOC.
MODULO BASICO DE WORD - I CICLO.DOC.DOC.
 
Escaneo y eliminación de malware en el equipo
Escaneo y eliminación de malware en el equipoEscaneo y eliminación de malware en el equipo
Escaneo y eliminación de malware en el equipo
 
infografia del sena para analisis y desarrollo de software
infografia del sena para analisis y desarrollo de softwareinfografia del sena para analisis y desarrollo de software
infografia del sena para analisis y desarrollo de software
 
Los desafíos de calidad de software que nos trae la IA y los LLMs
Los desafíos de calidad de software que nos trae la IA y los LLMsLos desafíos de calidad de software que nos trae la IA y los LLMs
Los desafíos de calidad de software que nos trae la IA y los LLMs
 
experiencia de aprendizaje sobre lectura y escritura como herramientas de ap...
experiencia de aprendizaje sobre lectura y escritura como  herramientas de ap...experiencia de aprendizaje sobre lectura y escritura como  herramientas de ap...
experiencia de aprendizaje sobre lectura y escritura como herramientas de ap...
 
Maquina de Dibujo y Escritura Automática.pdf
Maquina de Dibujo y Escritura Automática.pdfMaquina de Dibujo y Escritura Automática.pdf
Maquina de Dibujo y Escritura Automática.pdf
 
FICHA DE TRABAJO DE CREACION DE TABLAS EN WORD
FICHA  DE TRABAJO DE CREACION DE TABLAS EN WORDFICHA  DE TRABAJO DE CREACION DE TABLAS EN WORD
FICHA DE TRABAJO DE CREACION DE TABLAS EN WORD
 
trabajo integrador final sofi y vane.docx
trabajo integrador final sofi y vane.docxtrabajo integrador final sofi y vane.docx
trabajo integrador final sofi y vane.docx
 
Documento colaborativo. Solución del caso GA1-240201526-AA6-EV01.pdf
Documento colaborativo. Solución del caso GA1-240201526-AA6-EV01.pdfDocumento colaborativo. Solución del caso GA1-240201526-AA6-EV01.pdf
Documento colaborativo. Solución del caso GA1-240201526-AA6-EV01.pdf
 
Virus informático (tipos y opciones para prevenir)
Virus informático (tipos y opciones para prevenir)Virus informático (tipos y opciones para prevenir)
Virus informático (tipos y opciones para prevenir)
 

Destacado

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)contently
 
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 2024Albert Qian
 
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 InsightsKurio // The Social Media Age(ncy)
 
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 2024Search Engine Journal
 
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 summarySpeakerHub
 
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 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 Tessa Mero
 
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 IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
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 managementMindGenius
 
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...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellSaba Software
 

Destacado (20)

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...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Presentacion Aplicaciones condicionales selectivas mixtas.pdf

  • 1. Tema:Aplicaciones estructuradas condicionales simple y compuesta con operaciones de cálculo Docente: Alex Villegas Jiménez SESIÓN N°8: APLICACIONES CON ESTRUCTURA CONDICIONAL SIMPLE
  • 2. OPERACIONE DE CÁLCULO CON ESTRUCTURAS DE CONTROL SECUENCIAL
  • 3. ALGORITMO PARA LA CLASE ESTUDIANTE public class Estudiante { String idmatricula; String apepat; String apemat; String nombres; int añonac; int añoact; int edad; public Estudiante(String idmatricula, String apepat, String apemat, String nombres, int añonac, int añoact, int edad) { this.idmatricula = idmatricula; this.apepat = apepat; this.apemat = apemat; this.nombres = nombres; this.añonac = añonac; this.añoact = añoact; this.edad = edad; } } public String getIdmatricula() { return idmatricula; } public void setIdmatricula(String idmatricula) { this.idmatricula = idmatricula; } public String getApepat() { return apepat; } public void setApepat(String apepat) { this.apepat = apepat; } public String getApemat() { return apemat; } public void setApemat(String apemat) { this.apemat = apemat; } public String getNombres() { return nombres; } public void setNombres(String nombres) { this.nombres = nombres; }
  • 4. ALGORITMO PARA LA CLASE ESTUDIANTE public int getAñonac() { return añonac; } public void setAñonac(int añonac) { this.añonac = añonac; } public int getAñoact() { return añoact; } public void setAñoact(int añoact) { this.añoact = añoact; } public int getEdad() { return edad; } public void setEdad(int edad) { this.edad = edad; } int edad; Estudiante (){ }
  • 5. ALGORITMO PARA EL OBJETO ESTUDIANTE - SWING package pooestudiante; import javax.swing.*; public class objetoestudiante { public static void main(String[] arg){ String emat; String eapepat; String eapemat; String enombre; int eañonac; int eañoact; int edad; emat=JOptionPane.showInputDialog("Ingrese codigo de matricula:"); eapepat=JOptionPane.showInputDialog("Ingrese apellido paterno:"); eapemat=JOptionPane.showInputDialog("Ingrese apellido materno:"); enombre=JOptionPane.showInputDialog("Ingrese nombre(s):"); eañonac=Integer.parseInt(JOptionPane.showInputDialog(" Ingrese año nacimiento:")); eañoact=Integer.parseInt(JOptionPane.showInputDialog("I ngrese año actual:")); edad=eañoact-eañonac;
  • 6. ALGORITMO PARA EL OBJETO ESTUDIANTE - SWING Estudiante student = new Estudiante(); student.setIdmatricula(emat); student.setApepat(eapepat); student.setApemat(eapemat); student.setNombres(enombre); student.getAñonac(); student.getAñoact(); student.setEdad(edad); JOptionPane.showMessageDialog(null,"Datos del estudiante:"+" "+student.getIdmatricula()+" "+student.getApepat()+" "+student.getApemat()+" "+student.getNombres()); JOptionPane.showMessageDialog(null,"La edad del estudiabte es:"+student.getEdad()); if (edad>=18){ JOptionPane.showMessageDialog(null,"MAYOR DE EDAD"); }else {JOptionPane.showMessageDialog(null,"MENOR DE EDAD"); } }
  • 7. DEMOSTRACIÓN PRÁCTICA DEL PROMEDIO DE NOTAS DE LOS ESTUDIANTES PARA SABER SU CONDICIÓN
  • 8. TAREA DE SEMANA 8: PARTICPACIÓN PRÁCTICA - TEÓRICA EN AULA Y LABORATORIO CÓMPUTO