SlideShare una empresa de Scribd logo
JAVA arreglos multidimensionales
Faculty: Systems engineer
Course: Introduction of Programming
Topic: Arreglos multidimensionales en JAVA
________________________________________________
Socializer: Luis Fernando Castellanos Guarín
Email: Luis.castellanosg@usantoto.edu.co
Phone: 321-4582098
Topics
Arreglos
• About / Acerca de
• Como funciona /How it works
• Sintaxis / Syntax
• Ejemplos / examples
• Como recorrer un array multidimensional
• Ejercicios / Exercises
Arreglos Multidimensionales
Un array multidimensional son más de un array unidimensional unidos, para que te
hagas una idea, es como si fuera una tabla. Se crea igual que un array unidimensional,
solo hay que añadir un corchete mas con un tamaño en la definición del array
Syntax & Example
La sintaxis para declarar e inicializar un array multidimensional será:
También podemos alternativamente usar esta declaración:
• byte[][] edad = new byte[4][3];
• short [][] edad = new short[4][3];
• int[][] edad = new int[4][3];
• long[][] edad = new long[4][3];
• float[][] estatura = new float[3][2];
• double[][] estatura = new double[3][2];
• boolean[][] estado = new boolean[5][4];
• char[][] sexo = new char[2][1];
• String[][] nombre = new String[2][1];
Ejemplo:
Tipo_de_variable[ ][ ]… [ ] Nombre_del_array = new Tipo_de_variable[dimensión1][dimensión2]…[dimensiónN];
Tipo_de_variable[ ][ ] … [ ] Nombre_del_array;
Nombre_del_array = new Tipo_de_variable[dimensión1][dimensión2]…[dimensiónN];
Como recorrer un array multidimensional?
La sintaxis para declarar e inicializar un array multidimensional será:
También podemos alternativamente usar esta declaración:
• byte[][] edad = new byte[4][3];
• short [][] edad = new short[4][3];
• int[][] edad = new int[4][3];
• long[][] edad = new long[4][3];
• float[][] estatura = new float[3][2];
• double[][] estatura = new double[3][2];
• boolean[][] estado = new boolean[5][4];
• char[][] sexo = new char[2][1];
• String[][] nombre = new String[2][1];
Ejemplo:
Tipo_de_variable[ ][ ]… [ ] Nombre_del_array = new Tipo_de_variable[dimensión1][dimensión2]…[dimensiónN];
Tipo_de_variable[ ][ ] … [ ] Nombre_del_array;
Nombre_del_array = new Tipo_de_variable[dimensión1][dimensión2]…[dimensiónN];
How it works
//Array de 5 elementos
int[ ] variable1 = {3, 8, 2, 1,6};
Esta matriz representa un arreglo bidimensional de 3 filas por 5 columnas
cuyos valores son de tipo int.
La manera de declarar este arreglo sería:
int array [3][5];
//Definimos un array de 3 filas x 5 columnas
array[][]={{1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15}};
How it works
To practice!
P2Txx: Estudents_grades
create a JAVA software that:
Store in a matrix the number of students (10) with which a subject has, with their respective four notes
(P1: 20%, P2:25%, P3:25%, P4:30%.... Notes are random values between 0.0 and 5.0):
We will have 20 rows representing each student and 4 columns in which the respective notes will
appear 0 x P1, 1 x P2, 2 x P3 and 3 x P4). It is requested to make the statement of the matrix and
assign sample values to each item.
Construir un programa en JAVA que,
Almacene en una matriz el número de alumnos (10) con el que cuenta una asignatura, con sus respectivas cuatro
notas (P1: 20%, P2:25%, P3:25%, P4:30%....Las notas son valores aleatorios entre 0.0 y 5.0):
Tendremos 20 filas que representarán a cada estudiante y 4 columnas en las que figurarán las respectivas notas 0 =
P1, 1 = P2, 2 = P3 y 3 = P4). Se pide realizar la declaración de la matriz y
asignarle unos valores de ejemplo a cada elemento.
P2Txx: Estudents_grades
2 2.5 3 4.3
4 3.7 3.2 3.8
4.9 4.3 3.6 4.1
2.3 3.7 4.4 4
3.1 3.6 3.9 4
5 4.8 4.6 4.7
3.2 3 2.9 4
2 2.3 2.1 3.6
4 3.1 3.6 3
3 3.9 4.1 4.7
Notas del semestre (4)
Estudiantes(10)
Double [][] Notas = new double [10][4];
Notas [0][0] = 2;
Notas [0][1] = 2.5;
Notas [0][2] = 3 ;
Notas [0][3] = 4.3;
Notas [1][0] = 4 ;
Notas [1][1] = 3.7 ;
Notas [1][2] = 3.2
Notas [1][3] = 3.8;
Notas [2][0] = 4.9;
Notas [2][1] = 4.3;
Notas [2][2] = 3.6;
Notas [2][3] = 4.1;
…..
P2Txx: Estudents_grades
La mejor forma de recorrer el arreglo multidimensional es usando los ciclos FOR:
//Recorremos la primera columna de todas las filas
for(int i=0;i<array.length;i++){
System.out.println(array[i][0]);
}
//Recorremos todas las columnas de la segunda fila
for(int i=0;i<array[0].length;i++){
System.out.println(array[1][i]);
}
//Recorremos el array multidimensional
for (int i=0;i<array.length;i++){
for(int j=0;j<array[0].length;j++){
System.out.println(array[i][j]);
}
}
P2Txx: swimming_competition
create a JAVA software that:
Allow to simulate the data of a swimming competition where the four times are stored for each competitor and
also determine based on all the times of the competitors who is the winner. The user must specify how many times
(competitors) he wants to enter and the times must be generated randomly between 6.0 and 10 sec per lap.
Additionally, you must view all the times of each competitor.
Construir un programa en JAVA que,
Permita simular los datos de una competencia de natación donde se almacenan los cuatro tiempos por cada
competidor y además determinar con base en todos los tiempos de los competidores cual es el ganador. El usuario
debe especificar cuantos tiempos (competidores) desea ingresar y los tiempos se deben generar de forma aleatoria
entre 6.0 sec hasta 10 sec por vuelta.
Adicionalmente debe visualizar todos los tiempos de cada competidor.
P2Txx: rating_the_food
create a JAVA software that:
Let USTA learn how students rate food in the Giordano Bruno building cafeteria. For this, a scale of 1 to 10 was defined (1 denotes horrible and 10
denotes excellent). The software will perform a simulation where you randomly generate these grades for a month (20 days) for a number of
students (the user will determine how many students will be surveyed).
With these ratings the software will determine how much was the percentage of those who rated the food as:
• bad (<= 3)
• Regular (between 4 and 6)
• Excellent (> = 7
Construir un programa en JAVA que,
Permita a la USTA conocer cómo califican los estudiantes la comida de la cafetería del edificio Giordano Bruno. Para ello definió una escala de 1 a 10
(1 denota horrible y 10 denota excelente). El software realizara una simulación donde genere de forma aleatoria dichas calificaciones durante un
mes (20 días) para un número de estudiantes (el usuario determinara a cuántos estudiantes se encuestarán).
Con dichas calificaciones el software determinara cuanto fue el porcentaje de los que calificaron la comida como:
• mala (<=3)
• Regular (entre 4 y 6)
• Excelente (>=7
P2Txx: convert_words
Create a JAVA software that:
Allow to create a 4x5 matrix with the following information:
• maria, pedro, JOSE, camilo, rodrigo
• Ana, Lucia, Martha, Juliana, Patricia
• Felipe, ALEXANDER, soffy, Carmen, Augusto
• Alfredo, Luis, Ramiro, Karen, ANDREA
With the previous information, replace all the vowels with = a = @, e = 3, i = 1, o = Ø (alt + 157), u = ⌂ (alt +127)
Convert all words to uppercase.
Construir un programa en JAVA que,
Permita crear una matriz de 4x5 con la siguiente información:
• maria , pedro, JOSE, camilo, rodrigo
• Ana, lucia, martha, juliana, patricia
• Felipe, ALEXANDER, soffy, Carmen, Augusto
• Alfredo, Luis, Ramiro, Karen, ANDREA
Con la información anterior reemplazar todas las vocales por =a=@, e=3, i=1, o=Ø (alt+157) , u=⌂ (alt +127)
Pasar todas las palabras a mayúsculas.
P2Txx: numbers_of_rows
Create a JAVA software that:
Fill a two-dimensional array of N x M (values that the user must enter by keyboard), with random numbers between 1 and 1000.
Then the software will ask the user to enter a value between 1 to N (number of rows) and the software will display the sum, average, largest and
smallest of the numbers that are in that row.
When the user enters a value equal to zero (0) it must be finished.
Construir un programa en JAVA que,
Llene un array bidimensional de N x M (valores que debe ingresar por teclado el usuario), con números aleatorios
entre 1 y 1000.
Luego el software pedirá al usuario que ingrese un valor entre 1 a N (número de filas) y el software mostrara la suma, el promedio,
el mayor y el menor de los números que están en esa fila.
Cuando el usuario ingrese un valor igual a cero(0) se debe finalizar.
P2Txx: vote_for_clubs_and_bars
Create a JAVA software that:
Performs a simulation to vote on a bill in a department that proposes to end nightclubs and bars:
There are 123 municipalities and each municipality will vote for 0-NO, 1-YES (the votes will be random numbers between 0 and 5000).
Then the software must visualize which was the result of the vote: showing the winner and the loser with their percentage.
Additionally, you must view the rows that have the most voted for the winner and those that least vote for the loser.
Construir un programa en JAVA que,
Realice una simulación para votar un proyecto de ley en un departamento que propone acabar con las discotecas y bares:
Son 123 municipios y cada municipio votara por el 0-NO , 1-SI (los votos serán números randomicos entre 0 y 5000).
Luego el software deberá visualizar cual fue resultado de la votación: mostrando el ganador y el perdedor con su porcentaje.
Adicional deberá visualizar las filas que tienen más votaron por el ganador y las que menos votaron por el perdedor.
P2Txx: Estudents_grades
create a JAVA software that:
Perform the simulation of a voting process for the Boyacá governorate where there are seven (7) candidates from the main
political parties in Colombia:
0-liberal, 1-Conservador, 2- Alianza verde, 3- La U, 4- cambio radical, 5-Centro democrático, 6-MIRA, 7-Polo.
Generation of the vote for the 123 municipalities: bearing in mind that the votes must be between 1 and 1000 but cannot be
repeated.
In turn, get the total votes per party and determine who is the winner and who is second.
Construir un programa en JAVA que,
Realice la simulación de un proceso de votación para la gobernación de Boyacá en donde estén siete (7) candidatos de los
principales partidos políticos de Colombia:
0-liberal, 1-Conservador, 2- Alianza verde, 3- La U, 4- cambio radical, 5-Centro democrático, 6-MIRA, 7-Polo.
Genera la votación para los 123 municipios: teniendo presente que los votos deben estar entre 1 y 1000 pero no se pueden
repetir.
A su vez obtener el total de los votos por partido y determinar quien es el ganador y quien es el segundo.
JAVA arreglos multidimensionales
JAVA arreglos multidimensionales

Más contenido relacionado

PDF
Computación sb
PDF
Computación i 4001
DOCX
Manual en equipo
PPTX
24 Ejercicios de Programación (Análisis-Seudocodigo-Java)
PDF
Listado Ejercicios Básicos Java 5
PDF
Listado Ejercicios Básicos Java 4
PDF
Proyecto en Java: Tienda de productos electrónicos
PDF
Computacion i
Computación sb
Computación i 4001
Manual en equipo
24 Ejercicios de Programación (Análisis-Seudocodigo-Java)
Listado Ejercicios Básicos Java 5
Listado Ejercicios Básicos Java 4
Proyecto en Java: Tienda de productos electrónicos
Computacion i

La actualidad más candente (11)

PDF
Computación 1 curso tecmilenio
PDF
Listado Ejercicios Básicos Java 3
PDF
Listado Ejercicios Básicos Java 2
PDF
Machine learning: aprendizaje basado en árboles de decisión
PPTX
Ejercicios java
DOCX
Lo básico para programar
PPTX
Ejercicios grupales programacion
PDF
Computación 2 sept 2012
DOCX
Ejercicios De ProgramacióN Felipe
DOCX
Guía 7 matemática 7
PDF
Lo básico para programar
Computación 1 curso tecmilenio
Listado Ejercicios Básicos Java 3
Listado Ejercicios Básicos Java 2
Machine learning: aprendizaje basado en árboles de decisión
Ejercicios java
Lo básico para programar
Ejercicios grupales programacion
Computación 2 sept 2012
Ejercicios De ProgramacióN Felipe
Guía 7 matemática 7
Lo básico para programar
Publicidad

Similar a JAVA arreglos multidimensionales (20)

DOCX
Practicas
DOCX
Practicas java Nieto Ugalde Evelyn Anayansi Grupo:403
PPTX
ARREGLOS BIDIMENSIONALES - FII UNMSM 2024
DOCX
Arreglos unidad 2 semestre 2
DOCX
Arreglos
PDF
DOCX
Manual en equipo
PDF
Arrays multidimensionales pdf
PPTX
JAVA arreglos unidimensionales y ciclos (FOR / WHILE)
PPTX
PDF
Arrays y arraylist pedro corcuera java.pdf
PPTX
Arrays de exposicion
DOC
Vectores en programacion
DOCX
Arreglos
PDF
PPT DE LA SEMANA NUMERO 13 DEL CURSO PROGRAMACION TEMA MATRICECES
DOCX
Manual de prácticas java 2015
PPT
Tipos De Datos En Java
Practicas
Practicas java Nieto Ugalde Evelyn Anayansi Grupo:403
ARREGLOS BIDIMENSIONALES - FII UNMSM 2024
Arreglos unidad 2 semestre 2
Arreglos
Manual en equipo
Arrays multidimensionales pdf
JAVA arreglos unidimensionales y ciclos (FOR / WHILE)
Arrays y arraylist pedro corcuera java.pdf
Arrays de exposicion
Vectores en programacion
Arreglos
PPT DE LA SEMANA NUMERO 13 DEL CURSO PROGRAMACION TEMA MATRICECES
Manual de prácticas java 2015
Tipos De Datos En Java
Publicidad

Último (20)

DOCX
UNIDAD DE APRENDIZAJE 5 AGOSTO tradiciones
PDF
Punto Critico - Brian Tracy Ccesa007.pdf
PDF
Escuelas Desarmando una mirada subjetiva a la educación
PDF
COMUNICACION EFECTIVA PARA LA EDUCACION .pdf
PDF
DI, TEA, TDAH.pdf guía se secuencias didacticas
PDF
Salcedo, J. et al. - Recomendaciones para la utilización del lenguaje inclusi...
DOCX
PROYECTO DE APRENDIZAJE para la semana de fiestas patrias
PDF
ciencias-1.pdf libro cuarto basico niños
PDF
SESION 12 INMUNIZACIONES - CADENA DE FRÍO- SALUD FAMILIAR - PUEBLOS INDIGENAS...
PDF
Crear o Morir - Andres Oppenheimer Ccesa007.pdf
PDF
ACERTIJO Súper Círculo y la clave contra el Malvado Señor de las Formas. Por ...
PDF
Gasista de unidades unifuncionales - pagina 23 en adelante.pdf
PDF
IDH_Guatemala_2.pdfnjjjkeioooe ,l dkdldp ekooe
PDF
GUIA DE: CANVA + INTELIGENCIA ARTIFICIAL
DOCX
V UNIDAD - SEGUNDO GRADO. del mes de agosto
PDF
Habitos de Ricos - Juan Diego Gomez Ccesa007.pdf
DOCX
2 GRADO UNIDAD 5 - 2025.docx para primaria
PDF
Guia de Tesis y Proyectos de Investigacion FS4 Ccesa007.pdf
PDF
Lección 6 Escuela Sab. A través del mar rojo.pdf
PPT
Cosacos y hombres del Este en el Heer.ppt
UNIDAD DE APRENDIZAJE 5 AGOSTO tradiciones
Punto Critico - Brian Tracy Ccesa007.pdf
Escuelas Desarmando una mirada subjetiva a la educación
COMUNICACION EFECTIVA PARA LA EDUCACION .pdf
DI, TEA, TDAH.pdf guía se secuencias didacticas
Salcedo, J. et al. - Recomendaciones para la utilización del lenguaje inclusi...
PROYECTO DE APRENDIZAJE para la semana de fiestas patrias
ciencias-1.pdf libro cuarto basico niños
SESION 12 INMUNIZACIONES - CADENA DE FRÍO- SALUD FAMILIAR - PUEBLOS INDIGENAS...
Crear o Morir - Andres Oppenheimer Ccesa007.pdf
ACERTIJO Súper Círculo y la clave contra el Malvado Señor de las Formas. Por ...
Gasista de unidades unifuncionales - pagina 23 en adelante.pdf
IDH_Guatemala_2.pdfnjjjkeioooe ,l dkdldp ekooe
GUIA DE: CANVA + INTELIGENCIA ARTIFICIAL
V UNIDAD - SEGUNDO GRADO. del mes de agosto
Habitos de Ricos - Juan Diego Gomez Ccesa007.pdf
2 GRADO UNIDAD 5 - 2025.docx para primaria
Guia de Tesis y Proyectos de Investigacion FS4 Ccesa007.pdf
Lección 6 Escuela Sab. A través del mar rojo.pdf
Cosacos y hombres del Este en el Heer.ppt

JAVA arreglos multidimensionales

  • 2. Faculty: Systems engineer Course: Introduction of Programming Topic: Arreglos multidimensionales en JAVA ________________________________________________ Socializer: Luis Fernando Castellanos Guarín Email: Luis.castellanosg@usantoto.edu.co Phone: 321-4582098
  • 3. Topics Arreglos • About / Acerca de • Como funciona /How it works • Sintaxis / Syntax • Ejemplos / examples • Como recorrer un array multidimensional • Ejercicios / Exercises
  • 4. Arreglos Multidimensionales Un array multidimensional son más de un array unidimensional unidos, para que te hagas una idea, es como si fuera una tabla. Se crea igual que un array unidimensional, solo hay que añadir un corchete mas con un tamaño en la definición del array
  • 5. Syntax & Example La sintaxis para declarar e inicializar un array multidimensional será: También podemos alternativamente usar esta declaración: • byte[][] edad = new byte[4][3]; • short [][] edad = new short[4][3]; • int[][] edad = new int[4][3]; • long[][] edad = new long[4][3]; • float[][] estatura = new float[3][2]; • double[][] estatura = new double[3][2]; • boolean[][] estado = new boolean[5][4]; • char[][] sexo = new char[2][1]; • String[][] nombre = new String[2][1]; Ejemplo: Tipo_de_variable[ ][ ]… [ ] Nombre_del_array = new Tipo_de_variable[dimensión1][dimensión2]…[dimensiónN]; Tipo_de_variable[ ][ ] … [ ] Nombre_del_array; Nombre_del_array = new Tipo_de_variable[dimensión1][dimensión2]…[dimensiónN];
  • 6. Como recorrer un array multidimensional? La sintaxis para declarar e inicializar un array multidimensional será: También podemos alternativamente usar esta declaración: • byte[][] edad = new byte[4][3]; • short [][] edad = new short[4][3]; • int[][] edad = new int[4][3]; • long[][] edad = new long[4][3]; • float[][] estatura = new float[3][2]; • double[][] estatura = new double[3][2]; • boolean[][] estado = new boolean[5][4]; • char[][] sexo = new char[2][1]; • String[][] nombre = new String[2][1]; Ejemplo: Tipo_de_variable[ ][ ]… [ ] Nombre_del_array = new Tipo_de_variable[dimensión1][dimensión2]…[dimensiónN]; Tipo_de_variable[ ][ ] … [ ] Nombre_del_array; Nombre_del_array = new Tipo_de_variable[dimensión1][dimensión2]…[dimensiónN];
  • 7. How it works //Array de 5 elementos int[ ] variable1 = {3, 8, 2, 1,6}; Esta matriz representa un arreglo bidimensional de 3 filas por 5 columnas cuyos valores son de tipo int. La manera de declarar este arreglo sería: int array [3][5]; //Definimos un array de 3 filas x 5 columnas array[][]={{1,2,3,4,5},{6,7,8,9,10},{11,12,13,14,15}};
  • 10. P2Txx: Estudents_grades create a JAVA software that: Store in a matrix the number of students (10) with which a subject has, with their respective four notes (P1: 20%, P2:25%, P3:25%, P4:30%.... Notes are random values between 0.0 and 5.0): We will have 20 rows representing each student and 4 columns in which the respective notes will appear 0 x P1, 1 x P2, 2 x P3 and 3 x P4). It is requested to make the statement of the matrix and assign sample values to each item. Construir un programa en JAVA que, Almacene en una matriz el número de alumnos (10) con el que cuenta una asignatura, con sus respectivas cuatro notas (P1: 20%, P2:25%, P3:25%, P4:30%....Las notas son valores aleatorios entre 0.0 y 5.0): Tendremos 20 filas que representarán a cada estudiante y 4 columnas en las que figurarán las respectivas notas 0 = P1, 1 = P2, 2 = P3 y 3 = P4). Se pide realizar la declaración de la matriz y asignarle unos valores de ejemplo a cada elemento.
  • 11. P2Txx: Estudents_grades 2 2.5 3 4.3 4 3.7 3.2 3.8 4.9 4.3 3.6 4.1 2.3 3.7 4.4 4 3.1 3.6 3.9 4 5 4.8 4.6 4.7 3.2 3 2.9 4 2 2.3 2.1 3.6 4 3.1 3.6 3 3 3.9 4.1 4.7 Notas del semestre (4) Estudiantes(10) Double [][] Notas = new double [10][4]; Notas [0][0] = 2; Notas [0][1] = 2.5; Notas [0][2] = 3 ; Notas [0][3] = 4.3; Notas [1][0] = 4 ; Notas [1][1] = 3.7 ; Notas [1][2] = 3.2 Notas [1][3] = 3.8; Notas [2][0] = 4.9; Notas [2][1] = 4.3; Notas [2][2] = 3.6; Notas [2][3] = 4.1; …..
  • 12. P2Txx: Estudents_grades La mejor forma de recorrer el arreglo multidimensional es usando los ciclos FOR: //Recorremos la primera columna de todas las filas for(int i=0;i<array.length;i++){ System.out.println(array[i][0]); } //Recorremos todas las columnas de la segunda fila for(int i=0;i<array[0].length;i++){ System.out.println(array[1][i]); } //Recorremos el array multidimensional for (int i=0;i<array.length;i++){ for(int j=0;j<array[0].length;j++){ System.out.println(array[i][j]); } }
  • 13. P2Txx: swimming_competition create a JAVA software that: Allow to simulate the data of a swimming competition where the four times are stored for each competitor and also determine based on all the times of the competitors who is the winner. The user must specify how many times (competitors) he wants to enter and the times must be generated randomly between 6.0 and 10 sec per lap. Additionally, you must view all the times of each competitor. Construir un programa en JAVA que, Permita simular los datos de una competencia de natación donde se almacenan los cuatro tiempos por cada competidor y además determinar con base en todos los tiempos de los competidores cual es el ganador. El usuario debe especificar cuantos tiempos (competidores) desea ingresar y los tiempos se deben generar de forma aleatoria entre 6.0 sec hasta 10 sec por vuelta. Adicionalmente debe visualizar todos los tiempos de cada competidor.
  • 14. P2Txx: rating_the_food create a JAVA software that: Let USTA learn how students rate food in the Giordano Bruno building cafeteria. For this, a scale of 1 to 10 was defined (1 denotes horrible and 10 denotes excellent). The software will perform a simulation where you randomly generate these grades for a month (20 days) for a number of students (the user will determine how many students will be surveyed). With these ratings the software will determine how much was the percentage of those who rated the food as: • bad (<= 3) • Regular (between 4 and 6) • Excellent (> = 7 Construir un programa en JAVA que, Permita a la USTA conocer cómo califican los estudiantes la comida de la cafetería del edificio Giordano Bruno. Para ello definió una escala de 1 a 10 (1 denota horrible y 10 denota excelente). El software realizara una simulación donde genere de forma aleatoria dichas calificaciones durante un mes (20 días) para un número de estudiantes (el usuario determinara a cuántos estudiantes se encuestarán). Con dichas calificaciones el software determinara cuanto fue el porcentaje de los que calificaron la comida como: • mala (<=3) • Regular (entre 4 y 6) • Excelente (>=7
  • 15. P2Txx: convert_words Create a JAVA software that: Allow to create a 4x5 matrix with the following information: • maria, pedro, JOSE, camilo, rodrigo • Ana, Lucia, Martha, Juliana, Patricia • Felipe, ALEXANDER, soffy, Carmen, Augusto • Alfredo, Luis, Ramiro, Karen, ANDREA With the previous information, replace all the vowels with = a = @, e = 3, i = 1, o = Ø (alt + 157), u = ⌂ (alt +127) Convert all words to uppercase. Construir un programa en JAVA que, Permita crear una matriz de 4x5 con la siguiente información: • maria , pedro, JOSE, camilo, rodrigo • Ana, lucia, martha, juliana, patricia • Felipe, ALEXANDER, soffy, Carmen, Augusto • Alfredo, Luis, Ramiro, Karen, ANDREA Con la información anterior reemplazar todas las vocales por =a=@, e=3, i=1, o=Ø (alt+157) , u=⌂ (alt +127) Pasar todas las palabras a mayúsculas.
  • 16. P2Txx: numbers_of_rows Create a JAVA software that: Fill a two-dimensional array of N x M (values that the user must enter by keyboard), with random numbers between 1 and 1000. Then the software will ask the user to enter a value between 1 to N (number of rows) and the software will display the sum, average, largest and smallest of the numbers that are in that row. When the user enters a value equal to zero (0) it must be finished. Construir un programa en JAVA que, Llene un array bidimensional de N x M (valores que debe ingresar por teclado el usuario), con números aleatorios entre 1 y 1000. Luego el software pedirá al usuario que ingrese un valor entre 1 a N (número de filas) y el software mostrara la suma, el promedio, el mayor y el menor de los números que están en esa fila. Cuando el usuario ingrese un valor igual a cero(0) se debe finalizar.
  • 17. P2Txx: vote_for_clubs_and_bars Create a JAVA software that: Performs a simulation to vote on a bill in a department that proposes to end nightclubs and bars: There are 123 municipalities and each municipality will vote for 0-NO, 1-YES (the votes will be random numbers between 0 and 5000). Then the software must visualize which was the result of the vote: showing the winner and the loser with their percentage. Additionally, you must view the rows that have the most voted for the winner and those that least vote for the loser. Construir un programa en JAVA que, Realice una simulación para votar un proyecto de ley en un departamento que propone acabar con las discotecas y bares: Son 123 municipios y cada municipio votara por el 0-NO , 1-SI (los votos serán números randomicos entre 0 y 5000). Luego el software deberá visualizar cual fue resultado de la votación: mostrando el ganador y el perdedor con su porcentaje. Adicional deberá visualizar las filas que tienen más votaron por el ganador y las que menos votaron por el perdedor.
  • 18. P2Txx: Estudents_grades create a JAVA software that: Perform the simulation of a voting process for the Boyacá governorate where there are seven (7) candidates from the main political parties in Colombia: 0-liberal, 1-Conservador, 2- Alianza verde, 3- La U, 4- cambio radical, 5-Centro democrático, 6-MIRA, 7-Polo. Generation of the vote for the 123 municipalities: bearing in mind that the votes must be between 1 and 1000 but cannot be repeated. In turn, get the total votes per party and determine who is the winner and who is second. Construir un programa en JAVA que, Realice la simulación de un proceso de votación para la gobernación de Boyacá en donde estén siete (7) candidatos de los principales partidos políticos de Colombia: 0-liberal, 1-Conservador, 2- Alianza verde, 3- La U, 4- cambio radical, 5-Centro democrático, 6-MIRA, 7-Polo. Genera la votación para los 123 municipios: teniendo presente que los votos deben estar entre 1 y 1000 pero no se pueden repetir. A su vez obtener el total de los votos por partido y determinar quien es el ganador y quien es el segundo.