SlideShare a Scribd company logo
1 of 16
Centro de Estudio Tecnológicos Industrial
& Servicios 109.
Nombre: ADRIANA LIZBETH AVILA ORTIZ.
MARICARMEN AVILA ORTIZ
GRADO & GRUPO: 4° “BM”
PROFESORA: MARGARITA ROMERO
ALVARADO.
MATERIA:DESARROLLAR APLICACIONES
MOVIL.
AULA:31
CICLO ESCOLAR: FEB-JUN 2015.
 package com.programa7;
 import android.support.v7.app.ActionBarActivity;
 import android.os.Bundle;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.widget.EditText;
 import android.widget.TextView;
 public class MainActivity extends ActionBarActivity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_main);
 }
 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
 // Inflate the menu; this adds items to the action bar if it is present.
 getMenuInflater().inflate(R.menu.main, menu);
 return true;
 }
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
 // Handle action bar item clicks here. The action bar will
 // automatically handle clicks on the Home/Up button, so long
 // as you specify a parent activity in AndroidManifest.xml.
 int id = item.getItemId();
 if (id == R.id.action_settings) {
 return true;
 }
 return super.onOptionsItemSelected(item);
 }

 public void calcular (View view){
 EditText n=(EditText) findViewById (R.id.num1);
 TextView r=(TextView) findViewById (R.id.res);

 double d=Double.parseDouble(n.getText().toString());

 if(d<0){
 r.setText("Negativo");
 }
 r.setText("Positivo");
 }

 }
 Como podemos ver este
programa es muy fácil para
hacer ya que nomas es de seguir
todos los paso.

More Related Content

Viewers also liked

Jungle Collaboration Pic 2004
Jungle Collaboration Pic 2004Jungle Collaboration Pic 2004
Jungle Collaboration Pic 2004Cynthia Granard
 
Presentación de Open Lab Roberta en GDEG 2015
Presentación de Open Lab Roberta en GDEG 2015Presentación de Open Lab Roberta en GDEG 2015
Presentación de Open Lab Roberta en GDEG 2015Koldo Olaskoaga
 
Beasley_Amanda FINAL Dissertation
Beasley_Amanda FINAL DissertationBeasley_Amanda FINAL Dissertation
Beasley_Amanda FINAL DissertationAmanda Beasley, PhD
 
LinkedIn 101 - Getting Started the Right Way
LinkedIn 101 - Getting Started the Right WayLinkedIn 101 - Getting Started the Right Way
LinkedIn 101 - Getting Started the Right WaySteve Loates
 
Oficio interés Liquidación de Matrículas
Oficio interés Liquidación de MatrículasOficio interés Liquidación de Matrículas
Oficio interés Liquidación de MatrículasOscarhuber
 
Aptoide Advertising
Aptoide AdvertisingAptoide Advertising
Aptoide AdvertisingLuís Frade
 
Fgxpress apresentação fácil de entender - copia (43) - copia
Fgxpress   apresentação fácil de entender - copia (43) - copiaFgxpress   apresentação fácil de entender - copia (43) - copia
Fgxpress apresentação fácil de entender - copia (43) - copiaBdrag Wake
 

Viewers also liked (11)

Jungle Collaboration Pic 2004
Jungle Collaboration Pic 2004Jungle Collaboration Pic 2004
Jungle Collaboration Pic 2004
 
Presentación de Open Lab Roberta en GDEG 2015
Presentación de Open Lab Roberta en GDEG 2015Presentación de Open Lab Roberta en GDEG 2015
Presentación de Open Lab Roberta en GDEG 2015
 
Beasley_Amanda FINAL Dissertation
Beasley_Amanda FINAL DissertationBeasley_Amanda FINAL Dissertation
Beasley_Amanda FINAL Dissertation
 
4
44
4
 
EQ DIN Rayı Elektrik sayaçları ve Endüstriyel Fiş - Prizler Semineri
EQ DIN Rayı Elektrik sayaçları ve Endüstriyel Fiş - Prizler SemineriEQ DIN Rayı Elektrik sayaçları ve Endüstriyel Fiş - Prizler Semineri
EQ DIN Rayı Elektrik sayaçları ve Endüstriyel Fiş - Prizler Semineri
 
LinkedIn 101 - Getting Started the Right Way
LinkedIn 101 - Getting Started the Right WayLinkedIn 101 - Getting Started the Right Way
LinkedIn 101 - Getting Started the Right Way
 
Oficio interés Liquidación de Matrículas
Oficio interés Liquidación de MatrículasOficio interés Liquidación de Matrículas
Oficio interés Liquidación de Matrículas
 
Aptoide Advertising
Aptoide AdvertisingAptoide Advertising
Aptoide Advertising
 
Slideshare
SlideshareSlideshare
Slideshare
 
Fgxpress apresentação fácil de entender - copia (43) - copia
Fgxpress   apresentação fácil de entender - copia (43) - copiaFgxpress   apresentação fácil de entender - copia (43) - copia
Fgxpress apresentação fácil de entender - copia (43) - copia
 
3
33
3
 

More from Azul AO

Centro de estudio tecnológicos industrial
Centro  de estudio  tecnológicos industrialCentro  de estudio  tecnológicos industrial
Centro de estudio tecnológicos industrialAzul AO
 
Presentación 14
Presentación 14Presentación 14
Presentación 14Azul AO
 
Presentación 9
Presentación 9Presentación 9
Presentación 9Azul AO
 
Presentación 12
Presentación 12Presentación 12
Presentación 12Azul AO
 
Presentación11
Presentación11Presentación11
Presentación11Azul AO
 
Adriana Presentación 9
Adriana Presentación 9Adriana Presentación 9
Adriana Presentación 9Azul AO
 
Presentación8
Presentación8Presentación8
Presentación8Azul AO
 

More from Azul AO (7)

Centro de estudio tecnológicos industrial
Centro  de estudio  tecnológicos industrialCentro  de estudio  tecnológicos industrial
Centro de estudio tecnológicos industrial
 
Presentación 14
Presentación 14Presentación 14
Presentación 14
 
Presentación 9
Presentación 9Presentación 9
Presentación 9
 
Presentación 12
Presentación 12Presentación 12
Presentación 12
 
Presentación11
Presentación11Presentación11
Presentación11
 
Adriana Presentación 9
Adriana Presentación 9Adriana Presentación 9
Adriana Presentación 9
 
Presentación8
Presentación8Presentación8
Presentación8
 

Programa 7

  • 1. Centro de Estudio Tecnológicos Industrial & Servicios 109. Nombre: ADRIANA LIZBETH AVILA ORTIZ. MARICARMEN AVILA ORTIZ GRADO & GRUPO: 4° “BM” PROFESORA: MARGARITA ROMERO ALVARADO. MATERIA:DESARROLLAR APLICACIONES MOVIL. AULA:31 CICLO ESCOLAR: FEB-JUN 2015.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.  package com.programa7;  import android.support.v7.app.ActionBarActivity;  import android.os.Bundle;  import android.view.Menu;  import android.view.MenuItem;  import android.view.View;  import android.widget.EditText;  import android.widget.TextView;  public class MainActivity extends ActionBarActivity {  @Override  protected void onCreate(Bundle savedInstanceState) {  super.onCreate(savedInstanceState);  setContentView(R.layout.activity_main);  }  @Override  public boolean onCreateOptionsMenu(Menu menu) {  // Inflate the menu; this adds items to the action bar if it is present.  getMenuInflater().inflate(R.menu.main, menu);  return true;  }
  • 14.  @Override  public boolean onOptionsItemSelected(MenuItem item) {  // Handle action bar item clicks here. The action bar will  // automatically handle clicks on the Home/Up button, so long  // as you specify a parent activity in AndroidManifest.xml.  int id = item.getItemId();  if (id == R.id.action_settings) {  return true;  }  return super.onOptionsItemSelected(item);  }   public void calcular (View view){  EditText n=(EditText) findViewById (R.id.num1);  TextView r=(TextView) findViewById (R.id.res);   double d=Double.parseDouble(n.getText().toString());   if(d<0){  r.setText("Negativo");  }  r.setText("Positivo");  }   }
  • 15.
  • 16.  Como podemos ver este programa es muy fácil para hacer ya que nomas es de seguir todos los paso.