SlideShare a Scribd company logo
1 of 4
CETIS 109
ALUMNA: CERVANTES RAMIRES
YESICA ARELI
MARTINEZ RAMOS JACQUELINE
JANETH
MATERIA: DESARROLLA
APLICACIONES MOVILES
MAC. MARGARITA ROMERO
HOLA MUNDO (CODIFICACION)
packagecom.example.holamundo;
importandroid.os.Bundle;
importandroid.app.Activity;
importandroid.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
publicbooleanonCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds itemsto the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
PROGRAMA 2 (CODIFICACION)
package com.example.programa2;
importandroid.os.Bundle;
importandroid.app.Activity;
importandroid.view.Menu;
importandroid.view.View;
importandroid.widget.TextView;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
publicbooleanonCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds itemsto the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
public void sumar(View view){
EditText et1=(EditText) findViewById (R.id.num1);
EditText et2=(EditText) findViewById (R.id.num2);
TextView sol=(TextView) findViewById (R.id.res);
double n1=Double.parseDouble(et1.getText().toString());
double n2=Double.parseDouble(et2.getText().toString());
double r;
r=n1+n2
sol.setText(String.valueOf("El resultado de"+n1+"+"+n2+" = "+r));
}
}

More Related Content

What's hot

Tutorial practica 6d
Tutorial practica 6dTutorial practica 6d
Tutorial practica 6ddenisse_98
 
Tutorial practica 6(
Tutorial practica 6(Tutorial practica 6(
Tutorial practica 6(CAraceliCM
 
Tutorial practica 6(2)
Tutorial practica 6(2)Tutorial practica 6(2)
Tutorial practica 6(2)CAraceliCM
 
Pl 02-codigo-calculadora
Pl 02-codigo-calculadoraPl 02-codigo-calculadora
Pl 02-codigo-calculadoraNoé Arpasi
 
Pemrograman Mobile - Try Catch
Pemrograman Mobile - Try CatchPemrograman Mobile - Try Catch
Pemrograman Mobile - Try CatchMelina Krisnawati
 
practica 6- OPERACIONES ARITMETICAS UTILIZANDO RADIOBUTTON
practica 6- OPERACIONES ARITMETICAS UTILIZANDO RADIOBUTTONpractica 6- OPERACIONES ARITMETICAS UTILIZANDO RADIOBUTTON
practica 6- OPERACIONES ARITMETICAS UTILIZANDO RADIOBUTTONJenny Martinez
 

What's hot (12)

20 programas
20 programas20 programas
20 programas
 
Tutorial practica 6d
Tutorial practica 6dTutorial practica 6d
Tutorial practica 6d
 
Tutorial practica 6(
Tutorial practica 6(Tutorial practica 6(
Tutorial practica 6(
 
Tutorial practica 6(2)
Tutorial practica 6(2)Tutorial practica 6(2)
Tutorial practica 6(2)
 
Codigos
CodigosCodigos
Codigos
 
Practica 6 a
Practica 6 aPractica 6 a
Practica 6 a
 
operaciones aritméticas
operaciones aritméticas operaciones aritméticas
operaciones aritméticas
 
Hola mundo
Hola mundoHola mundo
Hola mundo
 
Pl 02-codigo-calculadora
Pl 02-codigo-calculadoraPl 02-codigo-calculadora
Pl 02-codigo-calculadora
 
Pemrograman Mobile - Try Catch
Pemrograman Mobile - Try CatchPemrograman Mobile - Try Catch
Pemrograman Mobile - Try Catch
 
practica 6- OPERACIONES ARITMETICAS UTILIZANDO RADIOBUTTON
practica 6- OPERACIONES ARITMETICAS UTILIZANDO RADIOBUTTONpractica 6- OPERACIONES ARITMETICAS UTILIZANDO RADIOBUTTON
practica 6- OPERACIONES ARITMETICAS UTILIZANDO RADIOBUTTON
 
Tutorial 5 sueldo_a
Tutorial 5 sueldo_aTutorial 5 sueldo_a
Tutorial 5 sueldo_a
 

More from arecerv

Insertsar un video2
Insertsar un video2Insertsar un video2
Insertsar un video2arecerv
 
Presentación 17
Presentación 17Presentación 17
Presentación 17arecerv
 
Presentación 16
Presentación 16Presentación 16
Presentación 16arecerv
 
Presentación 15
Presentación 15Presentación 15
Presentación 15arecerv
 
Insertsar un video
Insertsar un  videoInsertsar un  video
Insertsar un videoarecerv
 
Presentación 17
Presentación 17Presentación 17
Presentación 17arecerv
 
Presentacion10
Presentacion10Presentacion10
Presentacion10arecerv
 
Imagen eclipse
Imagen eclipseImagen eclipse
Imagen eclipsearecerv
 
Imagen eclipse
Imagen eclipseImagen eclipse
Imagen eclipsearecerv
 
Programa14
Programa14Programa14
Programa14arecerv
 
Presentación13
Presentación13Presentación13
Presentación13arecerv
 
Presentación 10
Presentación 10Presentación 10
Presentación 10arecerv
 
Programa 14
Programa 14Programa 14
Programa 14arecerv
 
Presentación 13
Presentación 13Presentación 13
Presentación 13arecerv
 
Presentación 12
Presentación 12Presentación 12
Presentación 12arecerv
 
Presentación 11
Presentación 11Presentación 11
Presentación 11arecerv
 
Presentación 10
Presentación 10Presentación 10
Presentación 10arecerv
 
Presentacion 10
Presentacion 10Presentacion 10
Presentacion 10arecerv
 
Presentación 9
Presentación 9Presentación 9
Presentación 9arecerv
 
Presentación 7
Presentación 7Presentación 7
Presentación 7arecerv
 

More from arecerv (20)

Insertsar un video2
Insertsar un video2Insertsar un video2
Insertsar un video2
 
Presentación 17
Presentación 17Presentación 17
Presentación 17
 
Presentación 16
Presentación 16Presentación 16
Presentación 16
 
Presentación 15
Presentación 15Presentación 15
Presentación 15
 
Insertsar un video
Insertsar un  videoInsertsar un  video
Insertsar un video
 
Presentación 17
Presentación 17Presentación 17
Presentación 17
 
Presentacion10
Presentacion10Presentacion10
Presentacion10
 
Imagen eclipse
Imagen eclipseImagen eclipse
Imagen eclipse
 
Imagen eclipse
Imagen eclipseImagen eclipse
Imagen eclipse
 
Programa14
Programa14Programa14
Programa14
 
Presentación13
Presentación13Presentación13
Presentación13
 
Presentación 10
Presentación 10Presentación 10
Presentación 10
 
Programa 14
Programa 14Programa 14
Programa 14
 
Presentación 13
Presentación 13Presentación 13
Presentación 13
 
Presentación 12
Presentación 12Presentación 12
Presentación 12
 
Presentación 11
Presentación 11Presentación 11
Presentación 11
 
Presentación 10
Presentación 10Presentación 10
Presentación 10
 
Presentacion 10
Presentacion 10Presentacion 10
Presentacion 10
 
Presentación 9
Presentación 9Presentación 9
Presentación 9
 
Presentación 7
Presentación 7Presentación 7
Presentación 7
 

Hola mundo

  • 1. CETIS 109 ALUMNA: CERVANTES RAMIRES YESICA ARELI MARTINEZ RAMOS JACQUELINE JANETH MATERIA: DESARROLLA APLICACIONES MOVILES MAC. MARGARITA ROMERO
  • 2. HOLA MUNDO (CODIFICACION) packagecom.example.holamundo; importandroid.os.Bundle; importandroid.app.Activity; importandroid.view.Menu; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override publicbooleanonCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds itemsto the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
  • 3. PROGRAMA 2 (CODIFICACION) package com.example.programa2; importandroid.os.Bundle; importandroid.app.Activity; importandroid.view.Menu; importandroid.view.View; importandroid.widget.TextView; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override publicbooleanonCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds itemsto the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } public void sumar(View view){
  • 4. EditText et1=(EditText) findViewById (R.id.num1); EditText et2=(EditText) findViewById (R.id.num2); TextView sol=(TextView) findViewById (R.id.res); double n1=Double.parseDouble(et1.getText().toString()); double n2=Double.parseDouble(et2.getText().toString()); double r; r=n1+n2 sol.setText(String.valueOf("El resultado de"+n1+"+"+n2+" = "+r)); } }