Programacion Orientada A Objetos Itvo

Páginas: 13 (3164 palabras) Publicado: 14 de octubre de 2012
Instituto Tecnológico Del Valle De Oaxaca
Instituto Tecnológico Del Valle De Oaxaca

Fundamentos De Programacion
Fundamentos De Programacion

Moisés Berzain Robles
Calvo
Moisés Berzain Robles
Calvo

Juan De Dios Marcos Gomez
Juan De Dios Marcos Gomez
Ejercicios Java
Ejercicios Java

Ejercicio 6
Ejercicio 6
/*
* To change this template, choose Tools | Templates* and open the template in the editor.
*/
package ejer6;
import java.util.Scanner;
/**
*
* @author Moisés
*/

public class Ejer6 {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {

Scanner miescaner = new Scanner(System.in);
double gradoscel=0, gradosfar=0;

System.out.println ("ingrese temperatura en celsius:");gradoscel = miescaner.nextDouble();

gradosfar=(1.8)*(gradoscel)+32;
System.out.println("la tenperatura fahrenheit es: "+gradosfar);

}
}
Ejercicio 7
Ejercicio 7

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ejer7;
import java.util.Scanner;
/**
* @author Moisés
*/
public class Ejer7 {
/**
* @paramargs the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner miescaner = new Scanner (System.in);
double costo=0, PVenta=0, Utilidad=0;

System.out.println("Ingrese el costo del archivo:");
costo=miescaner.nextDouble();

System.out.println("Escribe el Preciode venta del articulo:");
PVenta=miescaner.nextDouble();

Utilidad=PVenta-costo;
System.out.println("La Utlidad del articulo es:S/."+Utilidad+"Soles");

}
}
Ejercicio 8
Ejercicio 8

package ejer8;
import java.util.Scanner;
/**
* @author Moisés
*/
public class Ejer8
/**
* @param args the command line arguments
*/public static void main(String[] args) {
// TODO code application logic here
Scanner miescaner=new Scanner (System.in);
double Nota1=0, Nota2=0, NF=0;

String Mensaje="";
System.out.println("Ingrese Nota 1:");

Nota1=miescaner.nextDouble();
System.out.println("Ingrese Nota 2:");Nota2=miescaner.nextDouble();
NF=(Nota1+Nota2)/2;

if (NF>13) {
Mensaje="Felicidades";
}
System.out.println("La nota final es:"+NF+Mensaje);
}
}
Ejercicio 9
Ejercicio 9
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ejer9;
import java.util.Scanner;
/**
* @author Moisés
*/
publicclass Ejer9 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner miescaner=new Scanner(System.in);
int Horas=0;
double Tarifa=0, Sueldo=0;
System.out.println("Ingrese el total de horas trabajadas");
Horas = miescaner.nextInt();System.out.println("Ingrese la tarifa del trabajador");
Tarifa=miescaner.nextDouble();
Sueldo=Horas*Tarifa;
if (Sueldo>300){
Sueldo=Sueldo*0.9;
}
System.out.println("El Sueldo es"+Sueldo);
}
}

Ejercicio 10
Ejercicio 10
package ejer10;
import java.util.Scanner;
/**
* @author Moisés
*/
public class Ejer10 {
/**
* @param args the command linearguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner miescaner=new Scanner(System.in);
double MontoTotal=0, MontoPago=0;

System.out.println("Ingrese el monto total:");
MontoTotal=miescaner.nextDouble();
MontoPago=MontoTotal*1.18;

if (MontoPago > 500){...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Que es un Objeto? Programacion Orientada a Objetos
  • Programacion orientada a objetos
  • PROGRAMACIÓN ORIENTADA A OBJETOS EN C++.
  • Programacion orientada a objetos
  • ¿Que es la Programación Orientada a Objetos?
  • programacion orientada a objetos
  • Programacion orientada a objetos
  • Programación orientada a objetos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS